Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Ishtar::Socket Class Reference

#include <network.h>

Inheritance diagram for Ishtar::Socket:

Ishtar::OutputStream Ishtar::InputStream List of all members.

Detailed Description

A socket, a TCP/IP binary stream.


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


The documentation for this class was generated from the following files:
Generated on Mon Oct 24 17:30:54 2005 for libishtarnet by  doxygen 1.4.2