Logo Search packages:      
Sourcecode: poco version File versions  Download package

Poco::Net::ServerSocket Class Reference

#include <ServerSocket.h>

Inheritance diagram for Poco::Net::ServerSocket:

Poco::Net::Socket Poco::Net::SecureServerSocket

List of all members.


Detailed Description

This class provides an interface to a TCP server socket.

Definition at line 52 of file ServerSocket.h.


Public Types

enum  SelectMode { SELECT_READ = 1, SELECT_WRITE = 2, SELECT_ERROR = 4 }
 The mode argument to poll() and select().
typedef std::vector< SocketSocketList

Public Member Functions

virtual StreamSocket acceptConnection ()
virtual StreamSocket acceptConnection (SocketAddress &clientAddr)
SocketAddress address () const
int available () const
virtual void bind (Poco::UInt16 port, bool reuseAddress=false)
virtual void bind (const SocketAddress &address, bool reuseAddress=false)
void close ()
 Compares the SocketImpl pointers.
bool getKeepAlive () const
 Sets the value of the SO_KEEPALIVE socket option.
void getLinger (bool &on, int &seconds) const
 Sets the value of the SO_LINGER socket option.
bool getNoDelay () const
 Sets the value of the TCP_NODELAY socket option.
bool getOOBInline () const
 Sets the value of the SO_OOBINLINE socket option.
void getOption (int level, int option, IPAddress &value) const
void getOption (int level, int option, Poco::Timespan &value) const
void getOption (int level, int option, unsigned char &value) const
void getOption (int level, int option, unsigned &value) const
void getOption (int level, int option, int &value) const
int getReceiveBufferSize () const
 Sets the size of the receive buffer.
Poco::Timespan getReceiveTimeout () const
bool getReuseAddress () const
 Sets the value of the SO_REUSEADDR socket option.
bool getReusePort () const
int getSendBufferSize () const
 Sets the size of the send buffer.
Poco::Timespan getSendTimeout () const
 Sets the send timeout for the socket.
SocketImplimpl () const
 Returns the IP address and port number of the peer socket.
virtual void listen (int backlog=64)
bool operator!= (const Socket &socket) const
bool operator< (const Socket &socket) const
bool operator<= (const Socket &socket) const
 Compares the SocketImpl pointers.
ServerSocketoperator= (const Socket &socket)
 Destroys the StreamSocket.
bool operator== (const Socket &socket) const
bool operator> (const Socket &socket) const
 Compares the SocketImpl pointers.
bool operator>= (const Socket &socket) const
 Compares the SocketImpl pointers.
SocketAddress peerAddress () const
 Returns the IP address and port number of the socket.
bool poll (const Poco::Timespan &timeout, int mode) const
 ServerSocket (Poco::UInt16 port, int backlog=64)
 ServerSocket (const SocketAddress &address, int backlog=64)
 ServerSocket (const Socket &socket)
void setBlocking (bool flag)
 Returns the value of the SO_OOBINLINE socket option.
void setKeepAlive (bool flag)
 Returns the value of the TCP_NODELAY socket option.
void setLinger (bool on, int seconds)
void setNoDelay (bool flag)
 Returns the value of the SO_LINGER socket option.
void setOOBInline (bool flag)
void setOption (int level, int option, const IPAddress &value)
void setOption (int level, int option, const Poco::Timespan &value)
void setOption (int level, int option, unsigned char value)
void setOption (int level, int option, unsigned value)
void setOption (int level, int option, int value)
void setReceiveBufferSize (int size)
void setReceiveTimeout (const Poco::Timespan &timeout)
void setReuseAddress (bool flag)
 Returns the value of the SO_KEEPALIVE socket option.
void setReusePort (bool flag)
 Returns the value of the SO_REUSEADDR socket option.
void setSendBufferSize (int size)
void setSendTimeout (const Poco::Timespan &timeout)
virtual ~ServerSocket ()

Static Public Member Functions

static int select (SocketList &readList, SocketList &writeList, SocketList &exceptList, const Poco::Timespan &timeout)
 Closes the socket.
static bool supportsIPv4 ()
 Returns the SocketImpl for this socket.
static bool supportsIPv6 ()
 Returns true if the system supports IPv4.

Protected Member Functions

 ServerSocket (SocketImpl *pImpl, bool)
poco_socket_t sockfd () const

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

Generated by  Doxygen 1.6.0   Back to index