× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Lim,
 
<snip>
If I've a socket program that connected to a server and the program ended
abnormally without calling the close() to close the connection, would the
server knows that the connection has been broken and auto drop the
connection?
</snip>
 
I'm sure you will get lots of advice on how TCP/IP is used across network
works, but your question suggests one problem you can solve without going
outside your application: Namely - make sure your application DOES call
close() when the program ends abnormally. Here are a few suggestions you
could use to achieve this.
 
1) You can do this by registering a call-back procedure to be called if an
activation group ends (normally or abnormally) and call close() within that.
Do that with CEE4RAGE.
 
2) You could register a condition handler within your program and simply
call close() and percolate the error within that. Do that with CEEHDLR.
 
3) You could register a cancel handler within your program to be called if
your program ends (removed fom the call stack). If the end was abnormal you
can call close() wihin the cancel handler. Do that with CEERTX/CEEUTX.
 
4) You could put your whole RPG program code within a monitor group and call
close() within the on-error block.
 
5) You could code a *PSSR subroutine within your program and call close()
within that.
 
Although a well written server program should handle any and all client or
network glitches, you do have many options to ensure you tidy up after
yourself when things go wrong.
 
HTH
 
Larry Ducie
   
 
 
 
 

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.