MPMA Framework 0.4
Public Member Functions | Static Public Member Functions
NET::TCPClient Class Reference

Represents a stream-based reliable connection to another PC. More...

#include <TCP.h>

List of all members.

Public Member Functions

bool IsConnected () const
 Returns whether the client is still connected to the remote.
bool Send (const void *data, nuint dataLen)
 Sends data to the the remote. Returns false if the send failed.
nuint Receive (std::vector< uint8 > &data, nuint exactBytesToRetrieve=0)
 Receives bytes from the remote and appends it to data. Returns the number of bytes retrieved. If exactBytesToRetrieve is specified, then either exactly that many bytes will be returned from the stream, or none will be.
uint16 GetLocalPort () const
 Returns the local port that the client is using.
const AddressGetRemoteAddress () const
 Returns the address of the remote.
void EnableSendCoalescing (bool allow)
 Improves network bandwidth at the expense of latency (on by default).

Static Public Member Functions

static TCPClientConnect (const Address &addr, uint16 localPort=0)
 Initiates a new connection to a remote host. If localPort is 0, the system will select one automatically. Returns 0 on failure.
static void FreeClient (TCPClient *client)
 Disconnects and frees a client.

Detailed Description

Represents a stream-based reliable connection to another PC.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends