#include <mcllib/MCSocket.h>
Inheritance diagram for MCCOSocket:
Public Member Functions | |
void | connect (const MCNetAddr &addr, mcinterval_t timeout=MCIntervalInfinite) |
Establish a connection with a remote address. | |
MCNetAddr | getPeerName () const |
Get the remote address of the socket. | |
mcint32 | peek (void *buf, mcint32 len, mcinterval_t timeout=MCIntervalInfinite) |
Receive data from the connected peer. | |
mcint32 | recv (void *buf, mcint32 len, mcinterval_t timeout=MCIntervalInfinite) |
Receive data from the connected peer. | |
mcint32 | send (const void *buf, mcint32 len, mcinterval_t timeout=MCIntervalInfinite) |
Send data to the connected peer. | |
Protected Member Functions | |
MCCOSocket (void *impl) | |
Construct from an implementation. | |
MCCOSocket () | |
Default constructor for use by derived classes. |
Connection-oriented sockets have a permanent "peer" to which they are connected. Once connected, the peer to which they are connected cannot be changed.
|
Construct from an implementation. The implementation object must be derived from MCCOSockBaseImpl |
|
Establish a connection with a remote address. If the connection cannot be established, an exception is thrown.
|
|
Get the remote address of the socket. The socket must be connected. If the remote socket name cannot be obtained an exception is thrown.
|
|
Receive data from the connected peer. Same as recv() however the data received is left on the socket for further recv()s or peek()s. |
|
Receive data from the connected peer. If the receive fails an exception is thrown.
|
|
Send data to the connected peer. If the send fails an exception is thrown.
|