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

Poco::Net::Socket Class Reference

#include <Socket.h>

Inheritance diagram for Poco::Net::Socket:

Poco::Net::DatagramSocket Poco::Net::ICMPSocket Poco::Net::RawSocket Poco::Net::ServerSocket Poco::Net::StreamSocket Poco::Net::MulticastSocket Poco::Net::SecureServerSocket Poco::Net::DialogSocket Poco::Net::SecureStreamSocket

List of all members.


Detailed Description

Socket is the common base class for StreamSocket, ServerSocket, DatagramSocket and other socket classes.

It provides operations common to all socket types.

Definition at line 52 of file Socket.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

SocketAddress address () const
int available () const
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.
bool operator!= (const Socket &socket) const
bool operator< (const Socket &socket) const
bool operator<= (const Socket &socket) const
 Compares the SocketImpl pointers.
Socketoperator= (const Socket &socket)
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
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)
 Socket (const Socket &socket)
 Creates an uninitialized socket.
virtual ~Socket ()

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

 Socket (SocketImpl *pImpl)
 Returns true if the system supports IPv6.
poco_socket_t sockfd () const

Private Attributes

SocketImpl_pImpl
 Returns the socket descriptor for this socket.

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

Generated by  Doxygen 1.6.0   Back to index