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



Jim,

Make sure you re-establish a clear select set before doing the select()
call. Select() modifies the bits in the set so you have to start with a
clean one the next time.

Patrick

----- Original Message -----
From: "Jim W" <jimw2001@hotmail.com>
To: <midrange-l@midrange.com>
Sent: Thursday, May 02, 2002 5:10 PM
Subject: Sockets server HELP!


> This is a multi-part message in MIME format.
> --
> 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
>
>
> _________________________________________________________________
> Chat with friends online, try MSN Messenger: http://messenger.msn.com
> --
> [ Main server code.doc of type application/msword deleted ]
> _______________________________________________
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
> To post a message email: MIDRANGE-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
> or email: MIDRANGE-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/midrange-l.
>
>



As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.