I cant seem to find WSACreateEvent anywhere, is it exposed? There is win32event.CreateEvent but it takes 4 arguments.
I can find win32file.WSAEventSelect alright. On 26 May 2011 10:05, Amaury Forgeot d'Arc <amaur...@gmail.com> wrote: > 2011/5/26 David Markey <ad...@dmarkey.com>: > > Hi All, > > Sorry for the n00b question... > > With win32event.WaitForMultipleObjects, I dont seem to be able to give it > a > > plain socket object. How can I create a PyHANDLE from a socket? > > It won't work like this, because a socket has several things you > can wait for (available for read, available for write, accept, error, > and probably others) > > You should use WSAEventSelect() to associate a socket with a handle. > > This is pseudo-code (I don't have Windows at the moment, sorry):: > > socket_event = WSACreateEvent() > WSAEventSelect(mysocket, socket_event, FD_READ | FD_CLOSE) > ... then socket_event may be used in WaitForMultipleObjects... > WSACloseEvent(socket_event) > > > -- > Amaury Forgeot d'Arc >
_______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32