CAsyncSocket Class Members

Construction

CAsyncSocket Constructs a CAsyncSocket object.
Create Creates a socket.

Attributes

Attach Attaches a socket handle to a CAsyncSocket object.
Detach Detaches a socket handle from a CAsyncSocket object.
FromHandle Returns a pointer to a CAsyncSocket object, given a socket handle.
GetLastError Gets the error status for the last operation that failed.
GetPeerName Gets the address of the peer socket to which the socket is connected.
GetSockName Gets the local name for a socket.
GetSockOpt Retrieves a socket option.
SetSockOpt Sets a socket option.

Operations

Accept Accepts a connection on the socket.
AsyncSelect Requests event notification for the socket.
Bind Associates a local address with the socket.
Close Closes the socket.
Connect Establishes a connection to a peer socket.
IOCtl Controls the mode of the socket.
Listen Establishes a socket to listen for incoming connection requests.
Receive Receives data from the socket.
ReceiveFrom Receives a datagram and stores the source address.
Send Sends data to a connected socket.
SendTo Sends data to a specific destination.
ShutDown Disables Send and/or Receive calls on the socket.

Overridable Notification Functions

OnAccept Notifies a listening socket that it can accept pending connection requests by calling Accept.
OnClose Notifies a socket that the socket connected to it has closed.
OnConnect Notifies a connecting socket that the connection attempt is complete, whether successfully or in error.
OnOutOfBandData Notifies a receiving socket that there is out-of-band data to be read on the socket, usually an urgent message.
OnReceive Notifies a listening socket that there is data to be retrieved by calling Receive.
OnSend Notifies a socket that it can send data by calling Send.

Data Members

m_hSocket Indicates the SOCKET handle attached to this CAsyncSocket object.

CAsyncSocket OverviewBase Class MembersHierarchy Chart