//Attaches a socket handle to a CAsyncSocketEx object. BOOL Attach(SOCKET hSocket, long lEvent = FD_READ ¦ FD_WRITE ¦ FD_OOB ¦ FD_ACCEPT ¦ FD_CONNECT ¦ FD_CLOSE);
//Detaches a socket handle from a CAsyncSocketEx object. SOCKET Detach();
//Gets the error status for the last operation that failed. static int GetLastError();
//Gets the address of the peer socket to which the socket is connected. #ifdef _AFX BOOL GetPeerName(CString& rPeerAddress, UINT& rPeerPort); #endif BOOL GetPeerName(SOCKADDR* lpSockAddr, int* lpSockAddrLen);