![]() |
InternalWSAAsyncSelect() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
| Protected Function |
Declared in: AsyncSocket.h |
Declaration
int InternalWSAAsyncSelect(
unsigned int wMsg,
long lEvent);
DescriptionSave the last blocking status
Function Body
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())
See Also
This web site was generated
using Surveyor V4.50.811.1. Click
here
for more information. |
Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003. |