LRAUV  revA
SocketServer Class Reference

Implements a listening Socket server. More...

#include <SocketServer.h>

Inheritance diagram for SocketServer:
Collaboration diagram for SocketServer:

Public Member Functions

 SocketServer (int port) throw ( SocketException )
 
 SocketServer ()
 
virtual ~SocketServer ()
 
void accept (SocketServer &) throw ( SocketException )
 
void accept (SocketServer &newSocket, int timeoutMillis) throw ( SocketException )
 accept with timeout More...
 
- Public Member Functions inherited from Socket
virtual ~Socket ()
 
int send (const char *buffer, size_t bufferLength) const throw ( SocketException& )
 If return value is -1, check errno. More...
 
int sendall (const char *buffer, size_t bufferLength)
 Like send but making sure the whole requested buffer is sent out. More...
 
int recv (char *buffer, size_t bufferLength) const throw ( SocketException& )
 Blocking read. More...
 
int recv (char *buffer, size_t bufferLength, int timeoutMillis) throw ( SocketException& )
 Socket read with timeout. More...
 
int setTimeout (const int milliseconds)
 
int close ()
 
int getPort ()
 
int getDescriptor ()
 exposes the socket descriptor to facilitate direct operations More...
 

Additional Inherited Members

- Protected Member Functions inherited from Socket
 Socket ()
 
void create () throw ( SocketException& )
 
void bind (const int port) throw ( SocketException& )
 
void listen () const throw ( SocketException& )
 
void accept (Socket &newSocket) throw ( SocketException& )
 
void accept (Socket &newSocket, int timeoutMillis) throw ( SocketException& )
 accept with given timeout, which could be 0 for completely non-blocking behavior More...
 
void connect (const char *host, const int port) throw ( SocketException& )
 
void connect (const char *host, const int port, int timeoutMillis) throw ( SocketException& )
 connect with timeout. More...
 
void setNonBlocking (const bool nonBlocking) throw ( SocketException& )
 
bool isValid () const
 
void setTimeval (const int milliseconds, struct timeval &tv)
 

Detailed Description

Implements a listening Socket server.

Constructor & Destructor Documentation

SocketServer::SocketServer ( int  port)
throw (SocketException
)
SocketServer::SocketServer ( )
inline
virtual SocketServer::~SocketServer ( )
inlinevirtual

Member Function Documentation

void SocketServer::accept ( SocketServer sock)
throw (SocketException
)
void SocketServer::accept ( SocketServer newSocket,
int  timeoutMillis 
)
throw (SocketException
)

accept with timeout

References Socket::accept().


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