Allocates a socket handle.
int nSocketType = SOCK_STREAM,
long lEvent = FD_READ | FD_WRITE | FD_OOB | FD_ACCEPT | FD_CONNECT | FD_CLOSE,
int nProtocolType = 0,
int nAddressFormat = PF_INET
SOCK_STREAM or SOCK_DGRAM.
A bitmask that specifies a combination of network events in which the application is interested.
FD_READ: Want to receive notification of readiness for reading.
FD_WRITE: Want to receive notification of readiness for writing.
FD_OOB: Want to receive notification of the arrival of out-of-band data.
FD_ACCEPT: Want to receive notification of incoming connections.
FD_CONNECT: Want to receive notification of completed connection.
FD_CLOSE: Want to receive notification of socket closure.
Protocol to be used with the socket that is specific to the indicated address family.
Address family specification.
on success, TRUE on failure. FALSE
This method allocates a socket handle. It does not call
to bind the socket to a specified address, so you need to call CAsyncSocket::Bind Bind later to bind the socket to a specified address. You can use to set the socket option before it is bound. CAsyncSocket::SetSockOpt