xyzzy::TSocket::Connection Class Reference

#include <socket.hxx>

Inheritance diagram for xyzzy::TSocket::Connection:

xyzzy::TRcObj List of all members.

Public Member Functions

 Connection (int id, size_t sz=cDfltSz)
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 ~Connection ()

Private Attributes

const size_t m_cBufSz
char * mp_buf
int m_id

Constructor & Destructor Documentation

xyzzy::TSocket::Connection::Connection ( int  id,
size_t  sz = cDfltSz 
) [explicit]

xyzzy::TSocket::Connection::~Connection (  )  [virtual]


Member Function Documentation

const char * xyzzy::TSocket::Connection::recv ( ssize_t &  nrd,
bool  nonBlocking = true 
) throw (Exception)

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::TSocket::Connection::send ( const void *  buf,
size_t  len = 0,
bool  nonBlocking = true 
) throw (Exception)

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.


Member Data Documentation

const size_t xyzzy::TSocket::Connection::m_cBufSz [private]

char* xyzzy::TSocket::Connection::mp_buf [private]

int xyzzy::TSocket::Connection::m_id [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