#include <XPSocketClass.h>
Inheritance diagram for RNReplicaNet::XPSocket:
Public Member Functions | |
XPSocket () | |
virtual | ~XPSocket () |
virtual int | Create (void) |
int | Connect (const XPAddress &addr) |
int | Send (const char *data) |
int | Send (const char *data, const int len) |
int | Recv (char *const data, const int maxlen) |
int | Close (void) |
int | Listen (const int port=XPSOCK_PORT_ANY) |
XPSocket * | Accept (void) |
int | SetSendBuffer (const int size) |
int | SetRecvBuffer (const int size) |
int | GetAddress (XPAddress *const addr) |
int | GetPeerAddress (XPAddress *const addr) |
int | MutateSocket (XPSocket *socket) |
bool | IsAlive (void) |
t_XPSocket * | GetSocketPointer (void) |
Static Public Member Functions | |
static int | GetLastError (void) |
static int | GetMaxPacketSize (void) |
Friends | |
class | XPSocketUrgent |
|
The ctor for an XPSocket This checks to make sure sockets are active and sets some initial states. At this point no connection is made for the socket |
|
The dtor for an XPSocket This cleans up everything for this socket |
|
Accepts any pending connections for this socket. This should be used with the Listen() member function
Reimplemented in RNReplicaNet::XPStream. |
|
Closes the socket but does not delete the memory for the XPSocket class
Reimplemented in RNReplicaNet::XPStream. |
|
Tries to connect this socket to a network address
|
|
Creates a TCP style socket. This is the first stage to creating a connection
Reimplemented in RNReplicaNet::XPStream. |
|
Fills in the internet address and port of the socket to the address structure.
|
|
Gets the last error reported by the XPSocket API
|
|
Returns the maximum size for a packet
Reimplemented in RNReplicaNet::XPSocketUrgent, and RNReplicaNet::XPStream. |
|
Fills in the internet address of the peer of the socket to the address structure.
|
|
Access for the t_XPSocket pointer
|
|
Tests the alive state of the socket
|
|
Makes the socket listen on a certain port number
|
|
Mutates this socket class to use a socket
|
|
Tries to receive data that is waiting for this socket
Reimplemented in RNReplicaNet::XPStream. |
|
Sends data to the peer (the connected machine) for this socket
Reimplemented in RNReplicaNet::XPStream. |
|
Sends a NULL terminated string to the peer (the connected machine) for this socket
|
|
Sets the size of the recv buffer for the socket
|
|
Sets the size of the send buffer for the socket
|