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



There are two options for this:
1) Use the select() api under a non-blocking socket connection.
Select() api has a timeout parameter that will allow you to set how long to
wait for data. Try this link on how to set connection to a non-blocking
connection and how to use select() api.
http://www.scottklement.com/rpg/socktut/index.html

2) Use alarm() api under a blocked socket connection (I suspect that block
connection is what you are currently using). You can read this article from
Scott on how to use alarm() api:
http://systeminetwork.com/article/handling-errors-tcpip-programming



"Boman, James" <James.Boman@xxxxxxxxxx> wrote in message
news:mailman.27522.1297079845.2702.rpg400-l@xxxxxxxxxxxx...
Does anyone have an example of setting the timeout value for the RECV
command? I am using CONNECT to access a device from the i and a series of
sends and receives to download data to the device. I want to set the timeout
value on the RECV to only a few seconds so I can control the process in a
more timely fashion.

Thanks,

James




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.