× 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 Don,

Please read the following article "Timeouts with Sockets" for a description of two different ways of timing out the various socket APIs (including recv).
http://www.systeminetwork.com/article.cfm?id=53809

That article does require a membership with SystemiNetwork.com, but a free ("Associate") membership should do the trick.


Fisher, Don wrote:
Following Scott Klement's excellent sockets tutorial, I have created
a program that will send and receive data to and from a business
partner.  Since the "recv" sockets command waits indefinitely for
data, I tried to use the "setsockopt" command with level -1 (socket)
and option name 50 (recv timeout) to change the wait time to one
second.

I found out through the archives that this is not supported, but
strangely enough, it worked on the first day.  However, it stopped
working the next day.

So I guess I have two questions.  First, does anyone know why it
would work one day and not the next?  Second, if I can't change the
timeout value, how do I prevent "recv" from waiting forever for data?



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.