× 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.






This is from one of our field programmers.


"We have an interactive socket program that connects to a host system that sends and receives data.

If something happens to the connection while the interactive client program is receiving or waiting to receive data, the program just hangs on the receive api. It never ends. We tried to use the Socket Option SO_RCVTIMEO, but when setting it, it returns an error 3021 - "Value specified for the argument is not correct."



We have found articles saying not the use this method, but to use the alarm signal or select API to perform timeouts on sockets. Since our program is a client side socket program we thought the select API would not be appropriate and proceeded to code the socket program to use the alarm signals.



After researching it and reviewing some code examples, we added the logic to the program. When the program runs with the alarm signal logic, when the time out interval is reached the interactive session is ended and the user is put back to a sign on screen.



Does anyone know the best way to handle a time out while waiting for data to be received by an interactive client socket program, using RPGLE?"



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.