Odd behavior by socket.select() 
Author Message
 Odd behavior by socket.select()

I'm seeing one odd bit of behavior coming from socket.select, and I'm
wondering if there's something that I'm doing wrong.

When I have one or two clients connected and send data, socket.select
returns a list containing only that socket as having data.  When I add a
third (or more) client, socket.select returns a list with two sockets -
the second one, and whichever higher one actually has data.

Two clients, A & B
A sends data,
Socket.Select(readclient, nothing, nothing, 1000) returns
        readclient containing [A]
B sends data,
Socket.Select(readclient, nothing, nothing, 1000) returns
        readclient containing [B]
Add client C
C sends data,
Socket.Select(readclient, nothing, nothing, 1000) returns
        readclient containing [B,C]
B.Available = 0
C.Available = (the amount of waiting data)

Any suggestions?  Is this just a quirk?  Currently I'm handling it by
simply ignoring any readclient items where there's not any data actually
pending, but it seems a bit odd - my understanding was that the only
time you should get that kind of thing is possibly when the client
disconnects.

ajm



Wed, 20 Jul 2005 02:12:48 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Very odd behavior with DataTable.Select

2. Odd behavior with Dates -A2K

3. Access 2.0 odd transaction behavior

4. Odd Behavior With CommitTrans

5. odd Add Note behavior

6. Externally adding tasks via SQL gives odd behavior

7. Odd recalc behavior with shapeobj.duplicate

8. Odd behavior when inserting TextBox1 into header

9. odd behavior in Qbasic

10. Help, VFP - List boxes on pageframes with odd behavior

11. Odd printing behavior on Win2000

12. Odd behavior with setfocus

 

 
Powered by phpBB® Forum Software