#include <network.h>
Inheritance diagram for Ishtar::Socket:
Public Member Functions | |
Socket () | |
Constructor. | |
virtual | ~Socket () |
Destructor. | |
virtual void | write (const void *data, const Size size) |
Write a data buffer, no endian conversion. | |
virtual void | flush (void) |
Flush the internal buffer, be sure that datas are really written. | |
virtual void | read (void *data, Size size) |
Read a data buffer, no endian conversion. | |
std::string | getRemoteName (void) |
Return the name of the destination. | |
bool | isConnected (void) |
Return true if socket is connected. | |
void | disconnect (void) |
Disconnect. | |
Protected Member Functions | |
void | send (const void *data, Size size) |
Send the data on the socket, try until size is sent or an error occured. | |
Protected Attributes | |
TCPIPAddress | remoteAddress |
The destination address and port. | |
int | socket |
The TCP/IP stack socket. | |
unsigned char * | sendBuffer |
The sending bufffer. Its size is increased when required. On flush, bufferPos is set to zero and bufferSize rest unchanged. It is freed on Socket destruction. | |
size_t | bufferSize |
The size of sendBuffer. | |
size_t | bufferPos |
The actual position in sendBuffer. | |
bool | connected |
True if socket is connected. | |
Friends | |
class | NetworkClient |
class | NetworkServer |