|
You cannot attach files to messages on the mailing list. Either put your code in the message body itself, or put it on the web somewhere and post a link to it. and PLEASE don't post it in MS-WORD format. Please? On Thu, 2 May 2002, Jim W wrote: > Hi all, > > I have a sockets application that I'm having a problem with, and wonder if > anyone can point me in the right direction. The system is working, but it > is also eating up the machine. > > When I run the server program in debug, I find that the return code from the > select() statement is always coming back with a value of '1'. In this > particular case I sent one message from the client. The server recognized > the activity on the socket and issued a read against it, and processed the > incomming message. It then wrote the response back to the socket. From > that point on, with every loop through the code, it continues to show a > return code of '1' for that socket, even though there are zero bytes read. > Because of this it appears the select is never sleeping as it should, and > the result is a fast running loop that is eating all the machine's > resources. > > I've attached the main part of the code. The select() is at 257. I would > appreciate any pointers you might have. > > Thanks in advance! > > > Jim Whalen > PH 972 429-8238 > jimw2001@hotmail.com >
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.