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

Poco::Net::StreamSocket Class Reference

#include <StreamSocket.h>

Inheritance diagram for Poco::Net::StreamSocket:

Poco::Net::Socket Poco::Net::DialogSocket Poco::Net::SecureStreamSocket

List of all members.


Detailed Description

This class provides an interface to a TCP stream socket.

Definition at line 54 of file StreamSocket.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.
void connect (const SocketAddress &address, const Poco::Timespan &timeout)
void connect (const SocketAddress &address)
void connectNB (const SocketAddress &address)
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.
StreamSocketoperator= (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
int receiveBytes (void *buffer, int length, int flags=0)
int sendBytes (const void *buffer, int length, int flags=0)
void sendUrgent (unsigned char data)
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)
void shutdown ()
 Shuts down the sending part of the socket connection.
void shutdownReceive ()
void shutdownSend ()
 Shuts down the receiving part of the socket connection.
 StreamSocket (SocketImpl *pImpl)
 StreamSocket (const Socket &socket)
 StreamSocket (const SocketAddress &address)
virtual ~StreamSocket ()

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

poco_socket_t sockfd () const

Friends

class ServerSocket
class SocketIOS

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

Generated by  Doxygen 1.6.0   Back to index