CAsyncSocket::Attach

This method attaches an hSocket handle to the CAsyncSocket object. The SOCKET handle is stored in the object's m_hSocket data member.

At a Glance

Header file: Afxsock.h
Platforms: H/PC 2.0, Palm-size PC, H/PC Pro
Windows CE versions: 2.0 and later
Complete documentation: Visual C++ documentation

Syntax

BOOL Attach(SOCKET hSocket, long lEvent =FD_READ | FD_WRITE | FD_OOB | FD_ACCEPT | FD_CONNECT | FD_CLOSE);

See Also

CAsyncSocket::Detach, CAsyncSocket::m_hSocket