Export (0) Print
Expand All

CAsyncSocket Members 

Base Class Members

CObject 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.

GetPeerNameEx

Gets the address of the peer socket to which the socket is connected (handles IPv6 addresses).

GetSockName

Gets the local name for a socket.

GetSockNameEx

Gets the local name for a socket (handles IPv6 addresses).

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.

ReceiveFromEx

Receives a datagram and stores the source address (handles IPv6 addresses).

Send

Sends data to a connected socket.

SendTo

Sends data to a specific destination.

SendToEx

Sends data to a specific destination (handles IPv6 addresses).

ShutDown

Disables Send and/or Receive calls on the socket.

Socket

Allocates a socket handle.

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.

Operators

operator =

Assigns a new value to a CAsyncSocket object.

operator SOCKET

Use this operator to retrieve the SOCKET handle of the CAsyncSocket object.

Data Members

m_hSocket

Indicates the SOCKET handle attached to this CAsyncSocket object.

See Also

Community Additions

ADD
Show:
© 2014 Microsoft