![]() |
InternalWSAAsyncSelect() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Protected Function |
Declared in: AsyncSocket.h |
int InternalWSAAsyncSelect( unsigned int wMsg, long lEvent);
Save the last blocking status
try { //Cache the values m_iMsg=wMsg; m_lEvent=lEvent; //Message pairs typedef struct _MsgPair { unsigned int uiMsg; AsyncEvents aEvents; } MsgPair; //Our max events static const int iMaxEvents=4; //Our events data static const MsgPair aMsgPair[iMaxEvents]={{FD_READ,aeReceive}, {FD_WRITE,aeSend}, {FD_OOB,aeOOB}, {FD_CLOSE,aeClose}}; //Check if the messages are allowed for (int iCounter=0;iCounter<iMaxEvents;++iCounter) if ((m_lEvent & aMsgPair[iCounter].uiMsg) && (m_ucEvents & ((unsigned char)aMsgPair[iCounter].aEvents))) //Remove it m_lEvent^=aMsgPair[iCounter].uiMsg; if (m_bBlocking) return 0; else //And call the async select return WSAAsyncSelect(GetAsyncHandle(), GetWindowHandle(), wMsg, lEvent); } ERROR_HANDLER_RETURN("InternalWSAAsyncSelect",GetErrorCode())
![]() |
Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003. |