xyzzy::TClientSocket Class Reference

#include <socket.hxx>

Inheritance diagram for xyzzy::TClientSocket:

xyzzy::TSocket List of all members.

Public Member Functions

 TClientSocket (u_int16_t port, string naddr="127.0.0.1", size_t bufSz=cDfltSz) throw (Exception)
const char * recv (ssize_t &nrd, bool nonBlocking=true) throw (Exception)
bool send (const void *buf, size_t len=0, bool nonBlocking=true) throw (Exception)
virtual ~TClientSocket ()

Private Member Functions

void init (size_t bufSz) throw (Exception)

Private Attributes

TRcConnection m_conn

Constructor & Destructor Documentation

xyzzy::TClientSocket::TClientSocket ( u_int16_t  port,
string  naddr = "127.0.0.1",
size_t  bufSz = cDfltSz 
) throw (Exception) [explicit]

xyzzy::TClientSocket::~TClientSocket (  )  [virtual]


Member Function Documentation

const char* xyzzy::TClientSocket::recv ( ssize_t &  nrd,
bool  nonBlocking = true 
) throw (Exception) [inline]

Receive data from server.

Returns:
pointer to buffer on success and fill nrd with number of chars read. A terminating nul is written.

bool xyzzy::TClientSocket::send ( const void *  buf,
size_t  len = 0,
bool  nonBlocking = true 
) throw (Exception) [inline]

Send data to server. Use buf and len as buffer (to send) and length, respectively. If len==0, treat buf as null terminated string.

Returns:
true on success, false if non-blocking and op would block.

void xyzzy::TClientSocket::init ( size_t  bufSz  )  throw (Exception) [private]


Member Data Documentation

TRcConnection xyzzy::TClientSocket::m_conn [private]


The documentation for this class was generated from the following files:
Generated on Thu Mar 22 13:51:08 2007 for anvil by  doxygen 1.5.1