flat assembler
Message board for the users of flat assembler.
Index
> Windows > WSAAsyncSelect - can anyone please explain? |
Author |
|
xspeed 23 Aug 2007, 16:26
you should just go to msdn
WSAAsyncSelect=request event notification for a socket. Used to prevent network flooding on the same socket. int WSAAsyncSelect(SOCKET s,HWND hWnd,unsigned int wMsg,long lEvent); msdn 1. data arrives on socket s; Windows Sockets posts WSAAsyncSelect message 2. application processes some other message 3. while processing, application issues an ioctlsocket(s, FIONREAD...) and notices that there is data ready to be read 4. application issues a recv(s,...) to read the data 5. application loops to process next message, eventually reaching the WSAAsyncSelect message indicating that data is ready to read 6. application issues recv(s,...), which fails with the error WSAEWOULDBLOCK. * Issuing WSAAsyncSelect after one another cancel out the previous order. s1 = WSAAsyncSelect(s, hWnd, Msg1, megetkill); s1 = WSAAsyncSelect(s, hWnd, Msg2, ikillhim); megetkill/ikillhim=FD_READ,FD_WRITE,FD_OOB,FD_ACCEPT,FD_CONNECT NONE ,FD_CLOSE NONE. |
|||
23 Aug 2007, 16:26 |
|
f0dder 26 Aug 2007, 16:35
You shouldn't bother with WSAAsyncSelect, even blocking sockets + threads are better imho... look at WSAEventSelect or I/O Completion Ports instead.
|
|||
26 Aug 2007, 16:35 |
|
vid 27 Aug 2007, 08:39
if you only have few concurrent connections, threads should be easier to do
|
|||
27 Aug 2007, 08:39 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.