I cant seem to find WSACreateEvent anywhere, is it exposed?<div><br></div><div>There is win32event.CreateEvent but it takes 4 arguments.<br><div><br></div><div>I can find win32file.WSAEventSelect alright.</div><div><br><br>
<div class="gmail_quote">On 26 May 2011 10:05, Amaury Forgeot d&#39;Arc <span dir="ltr">&lt;<a href="mailto:amauryfa@gmail.com">amauryfa@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
2011/5/26 David Markey &lt;<a href="mailto:admin@dmarkey.com">admin@dmarkey.com</a>&gt;:<br>
<div class="im">&gt; Hi All,<br>
&gt; Sorry for the n00b question...<br>
&gt; With win32event.WaitForMultipleObjects, I dont seem to be able to give it a<br>
&gt; plain socket object. How can I create a PyHANDLE from a socket?<br>
<br>
</div>It won&#39;t work like this, because a socket has several things you<br>
can wait for (available for read, available for write, accept, error,<br>
and probably others)<br>
<br>
You should use WSAEventSelect() to associate a socket with a handle.<br>
<br>
This is pseudo-code (I don&#39;t have Windows at the moment, sorry)::<br>
<br>
    socket_event = WSACreateEvent()<br>
    WSAEventSelect(mysocket, socket_event, FD_READ | FD_CLOSE)<br>
    ... then socket_event may be used in WaitForMultipleObjects...<br>
    WSACloseEvent(socket_event)<br>
<br>
<br>
--<br>
<font color="#888888">Amaury Forgeot d&#39;Arc<br>
</font></blockquote></div><br></div></div>