This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

problem/bug in select command of socket / winsock


Hi,
I wrote a C++ / wxWindows (very nice GUI lib :-) program.
It normally handles TCP/IP socket communication by utilizing it's
"event-handling" system - so that e.g.  recv() doesn't block the program
until data arrives  -- all that works fine.

But I have a extra / second thread dedicated just to read from a socket .
This _HAS_ to block on recv - otherwise it would run in circles and use up
100% CPU while waiting on data. This mode in wxWindows is activated with:
socket->SetFlag(wxSOCKET_BLOCK).  I found that that is implemented by
using a ("blocking") select()  [somewhere inside a part that wxWindows
calls their GSocket implementation]

So: all this works fine when I compile on VC++ (6)
    But cygwin just seems to run right through the select() call  [ I used
the gdb -- very fancy :-)) someone did a good job!! ]


I read that there is an issue about if or how to use the winsock part or
the posix-compliant cygwin version  .   Is that a way to influence that
or did I just found a bug?

Thanks, have a great day,

Sebastian Haase
University of California, San Francisco
(415)502-4316



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]