Networking Forums

Networking Forums > Computer Networking > Linux Networking > select doesn't work

Reply
Thread Tools Display Modes

select doesn't work

 
 
c plusplus
Guest
Posts: n/a

 
      09-27-2006, 04:57 AM
hi all, I encountered a strange thing when using select() function in
multithread. Here is what I met: One application use two threads, one
manages connection with blocking select from sctp (tcp-style ), other
manages connection with blocking select from TCP. And the application
will deal with the message and then send it from one to other,vice
versa. But under the situation about two messages per second one
direction(total 4 or 5 messages both directions), the application work
well. And when up to 5 messages persecond one direction, the select at
TCP side can not report any message reached any more. But I can see the
message has been sent to the TCP connection from ethereal.
Now, what confuse me is whether one thread with one select can cause
conflict when message came in. (one select on tcp side can't work,
other work well)And what real reasons do cause this problem?
Any hints are appceciated. Thank you in advance.

ps: linux kernel : 2.6.17-4

 
Reply With Quote
 
 
 
 
David Schwartz
Guest
Posts: n/a

 
      09-27-2006, 08:06 AM

c plusplus wrote:

> hi all, I encountered a strange thing when using select() function in
> multithread. Here is what I met: One application use two threads, one
> manages connection with blocking select from sctp (tcp-style ), other
> manages connection with blocking select from TCP. And the application
> will deal with the message and then send it from one to other,vice
> versa. But under the situation about two messages per second one
> direction(total 4 or 5 messages both directions), the application work
> well. And when up to 5 messages persecond one direction, the select at
> TCP side can not report any message reached any more. But I can see the
> message has been sent to the TCP connection from ethereal.
> Now, what confuse me is whether one thread with one select can cause
> conflict when message came in. (one select on tcp side can't work,
> other work well)And what real reasons do cause this problem?
> Any hints are appceciated. Thank you in advance.
>
> ps: linux kernel : 2.6.17-4


Sounds like you either have a bug or you think that TCP somehow glues
bytes together into messages. You understand that a select hit on a TCP
connection has nothing whatsoever to do with any messages, it means
that some *bytes* may be received. TCP does not glue bytes together
into messages.

DS

 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
wireless connection (w\authentication) doesn't work, while wiredconnection does, on select laptops ekimack@gmail.com Wireless Internet 0 03-15-2009 04:16 AM
apt-get doesn't work Fab Linux Networking 2 03-11-2007 02:20 PM
How (well) does autochannel select work? David Arnstein Wireless Internet 2 01-04-2007 07:30 AM
NIC doesn't work SGNOME Windows Networking 3 01-14-2004 01:41 PM
2.2 select() on UDP Socket doesn't work as expected rs Linux Networking 0 07-08-2003 09:52 AM



1 2 3 4 5 6 7 8 9 10 11