Select() call behaviour RRS feed

  • Question

  • Hi All,

    I am working on a protocol development which involves use of TCP as transport protocol. In this I am creating two task(threads) one for reading and other for sending the data to the same socket( I am using the non-blocing socket) . In read task I am adding the sock fd to the readfd set and calling select only over the readfd set(Write and Exception fd set are null). Select gets bolcked and waits for some operation to occur on readfd set. But if at the same time if I try to send data from the send task (while read task is waiting over select) it is getting blocked within the send() call of send task.

    Can anybody tell me why this is happening?

    when i am adding the writefd set in the select call that time select becomes non block and returing over the writefd set even when I am not sending any data form send task.

    Thanks in Advance.
    Wednesday, November 14, 2007 10:49 AM


  • may be the threads are reffering to same object, no body answered this post... so i did...
    Thursday, November 22, 2007 9:41 PM