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

Poco::Net::RawSocket Class Reference

#include <RawSocket.h>

Inheritance diagram for Poco::Net::RawSocket:

Poco::Net::Socket

List of all members.


Detailed Description

This class provides an interface to a raw IP socket.

Definition at line 51 of file RawSocket.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 bind (const SocketAddress &address, bool reuseAddress=false)
void close ()
 Compares the SocketImpl pointers.
void connect (const SocketAddress &address)
bool getBroadcast () const
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.
RawSocketoperator= (const Socket &socket)
 Destroys the RawSocket.
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
 RawSocket (const Socket &socket)
 RawSocket (const SocketAddress &address, bool reuseAddress=false)
 RawSocket (IPAddress::Family family, int proto=IPPROTO_RAW)
 Creates an unconnected IPv4 raw socket.
int receiveBytes (void *buffer, int length, int flags=0)
int receiveFrom (void *buffer, int length, SocketAddress &address, int flags=0)
int sendBytes (const void *buffer, int length, int flags=0)
int sendTo (const void *buffer, int length, const SocketAddress &address, int flags=0)
void setBlocking (bool flag)
 Returns the value of the SO_OOBINLINE socket option.
void setBroadcast (bool flag)
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)
 ~RawSocket ()

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

 RawSocket (SocketImpl *pImpl)
 Returns the value of the SO_BROADCAST socket option.
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