Call this member function to obtain a pointer to a CSocket object, when you have a SOCKET handle. If a CSocket object is not attached to the handle passed in the hSocket parameter, this function returns NULL. It does not create a temporary object.
static CSocket* PASCAL FromHandle( SOCKET hSocket );
Header file: | Afxsock.h |
Platforms: | |
Versions: | 2.0 and later |
Complete documentation | Visual C++ documentation |
CSocket Overview, CSocket Member Functions, Windows Sockets Classes, CAsyncSocket::FromHandle