CAsyncSocket::Create

This method, after constructing a socket object, creates the Windows socket and attaches it. Create then calls the Bind function to bind the socket to the specified address.

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 Create( UINT nSocketPort = 0, int nSocketType = SOCK_STREAM,
long
lEvent = FD_READ | FD_WRITE | FD_OOB | FD_ACCEPT |
FD_CONNECT | FD_CLOSE, LPCTSTR
lpszSocketAddress = NULL );

See Also

CAsyncSocket::Accept, CAsyncSocket::Bind, CAsyncSocket::Connect, CAsyncSocket::CAsyncSocket, CAsyncSocket::GetSockName, CAsyncSocket::IOCtl, CAsyncSocket::Listen, CAsyncSocket::Receive, CAsyncSocket::Send, CAsyncSocket::ShutDown