This is the mail archive of the cygwin-patches@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] |
Other format: | [Raw text] |
On Tue, 27 May 2003, Corinna Vinschen wrote: > Hi Thomas, > > On Tue, May 27, 2003 at 09:15:10AM +0200, Thomas Pfaff wrote: > > * fhandler_socket.cc (sock_event::~sock_event): New method. > > (sock_event::load): Change to void. Check if winsock2 is available. > > (socke_event::wait): Return 0 if interruptible mode is not available. > > (fhandler_socket::connect): Remove checks for winsock2 availability. > > (fhandler_socket::accept): Ditto. > > that looks pretty good, just... > > > --- fhandler_socket.cc.org 2003-05-26 16:08:16.000000000 +0200 > > +++ fhandler_socket.cc 2003-05-27 09:05:38.000000000 +0200 > > @@ -131,31 +131,44 @@ public: > > ev[0] = WSA_INVALID_EVENT; > > ev[1] = signal_arrived; > > } > > - bool load (SOCKET sock, int type_bit) > > + ~sock_event () > > { > > - if ((ev[0] = WSACreateEvent ()) == WSA_INVALID_EVENT) > > - return false; > > + if (ev[0] != WSA_INVALID_EVENT) > > + CloseHandle (ev[0]); > ^^^^^^^^^^^ > ...shouldn't that be a WSACloseEvent? > > > + } > Of course you are right. I have fixed this. In reality this shouldn't make any difference since WSACreateEvent will use CreateEvent and the handles are therefore compatible. In another project i have used CreateEvent to create an event that was used with WSAEventSelect because i had to create it in a constructor before WSAStartup and it worked the same way. Thomas
Attachment:
fhandler_socket.patch
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |