Socket Class Reference

#include <Socket.h>

Inheritance diagram for Socket:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 Socket ()
virtual ~Socket ()
void write (char *data_in, int unsigned long) throw (SocketDisconnectedException)
void write (char *data_in) throw (SocketDisconnectedException)
void writeLine (char *data_in) throw (SocketDisconnectedException)
char * read (unsigned long numbytes) throw (SocketDisconnectedException)
char * readUntil (char endchar) throw (SocketDisconnectedException)
char * readLine () throw (SocketDisconnectedException)
bool isDataWaiting () throw (SocketDisconnectedException)
bool isConnected ()
void getHostIP (string &str_in)
void getHostName (string &str_in)
void shutdown () throw (SocketFailedException)
void close () throw (SocketFailedException)
Socketoperator<< (string &s) throw (SocketDisconnectedException)
Socketoperator<< (const char *s) throw (SocketDisconnectedException)
Socketoperator<< (Socket &(*f)(Socket &))
Socketoperator>> (string &s) throw (SocketDisconnectedException)

Static Public Member Functions

static void getLocalHostName (string &str_in) throw (SocketFailedException)
static void getLocalHostAddrs (vector< string > &strvect_in) throw (SocketFailedException)
static void initSockets () throw (SocketFailedException)
static void shutdownSockets () throw (SocketFailedException)

Public Attributes

int sock_handle
struct sockaddr_in addr local_addr

Protected Attributes

struct hostent * host
const char * address
int port

Friends

Socketendl (Socket &cs) throw (SocketDisconnectedException)


Constructor & Destructor Documentation

Socket::Socket (  ) 

Socket::~Socket (  )  [virtual]


Member Function Documentation

void Socket::write ( char *  data_in,
int unsigned  long 
) throw (SocketDisconnectedException)

void Socket::write ( char *  data_in  )  throw (SocketDisconnectedException)

Here is the call graph for this function:

void Socket::writeLine ( char *  data_in  )  throw (SocketDisconnectedException)

Here is the call graph for this function:

char * Socket::read ( unsigned long  numbytes  )  throw (SocketDisconnectedException)

char * Socket::readUntil ( char  endchar  )  throw (SocketDisconnectedException)

char * Socket::readLine (  )  throw (SocketDisconnectedException)

Here is the call graph for this function:

bool Socket::isDataWaiting (  )  throw (SocketDisconnectedException)

bool Socket::isConnected (  ) 

void Socket::getHostIP ( string &  str_in  ) 

void Socket::getHostName ( string &  str_in  ) 

Here is the call graph for this function:

void Socket::getLocalHostName ( string &  str_in  )  throw (SocketFailedException) [static]

void Socket::getLocalHostAddrs ( vector< string > &  strvect_in  )  throw (SocketFailedException) [static]

Here is the call graph for this function:

void Socket::shutdown (  )  throw (SocketFailedException)

void Socket::close (  )  throw (SocketFailedException)

Socket & Socket::operator<< ( string &  s  )  throw (SocketDisconnectedException)

Here is the call graph for this function:

Socket & Socket::operator<< ( const char *  s  )  throw (SocketDisconnectedException)

Here is the call graph for this function:

Socket & Socket::operator<< ( Socket &(*)(Socket &)  f  ) 

Socket & Socket::operator>> ( string &  s  )  throw (SocketDisconnectedException)

Here is the call graph for this function:

void Socket::initSockets (  )  throw (SocketFailedException) [static]

void Socket::shutdownSockets (  )  throw (SocketFailedException) [static]


Friends And Related Function Documentation

Socket& endl ( Socket cs  )  throw (SocketDisconnectedException) [friend]


Member Data Documentation

struct hostent* Socket::host [read, protected]

const char* Socket::address [protected]

int Socket::port [protected]

struct sockaddr_in addr Socket::local_addr [read]


The documentation for this class was generated from the following files:

Generated on Thu Mar 19 19:35:51 2009 for CubicVR by  doxygen 1.5.6