#include <conexus/nspr_tcp.h>
Inheritance diagram for Conexus::NSPR::TCP:
Public Types | |
typedef ConexusPointer< TCP > | pointer |
typedef ConexusPointer< TCP > | pointer |
typedef ConexusPointer< TCP > | pointer |
Public Member Functions | |
IDIOSKOPOS_OBJECT (Conexus::NSPR::TCP) | |
void | open () throw (open_exception) |
virtual void | connect () throw ( connect_exception ) |
virtual void | connect (Address &a) throw ( connect_exception ) |
TCP (uint16_t port=0) | |
void | open () throw (open_exception) |
virtual ssize_t | write (const void *data, size_t size) throw ( write_exception ) |
Overloads the Socket ancestor send method to ensure that the socket is connected before trying to send. | |
virtual Data::pointer | read (size_t s=-1) throw ( read_exception ) |
Receives a single datagram from the TCP socket up to s bytes in size; allocates any memory necessary as a smart pointer contained in the returned Data object. | |
virtual void | connect () throw ( connect_exception ) |
virtual void | connect (Address &a) throw ( connect_exception ) |
virtual const std::string & | object_type () |
TCP (uint16_t port=0) | |
void | open () throw (open_exception) |
virtual ssize_t | write (const void *data, size_t size) throw ( write_exception ) |
Overloads the Socket ancestor send method to ensure that the socket is connected before trying to send. | |
virtual Data::pointer | read (size_t s=-1) throw ( read_exception ) |
Receives a single datagram from the TCP socket up to s bytes in size; allocates any memory necessary as a smart pointer contained in the returned Data object. | |
virtual void | connect () throw ( connect_exception ) |
virtual void | connect (Address &a) throw ( connect_exception ) |
virtual const std::string & | object_type () |
Static Public Member Functions | |
static TCP::pointer | create (uint16_t port=0) |
static TCP::pointer | create (uint32_t interface, uint16_t port) |
static TCP::pointer | create (const std::string &interface, uint16_t port) |
static TCP::pointer | create (uint16_t port=0) |
static TCP::pointer | create (uint16_t port=0) |
Protected Member Functions | |
TCP (uint32_t interface, uint16_t port) | |
TCP (const std::string &interface, uint16_t port) | |
TCP (PRFileDesc *accepted_fd, bool) | |
Protected constructor to be used by TCPServer to create TCP connections. | |
virtual ssize_t | write_data (long int timeout, Data::const_pointer data) throw ( write_exception ) |
Overloads the Socket ancestor send method to ensure that the socket is connected before trying to send. | |
virtual Data::pointer | read_data (long int timeout, size_t s=0) throw ( read_exception ) |
Receives a single datagram from the TCP socket up to s bytes in size; allocates any memory necessary as a smart pointer contained in the returned Data object. | |
TCP (PRFileDesc *accepted_fd, bool) | |
Protected constructor to be used by TCPServer to create TCP connections. | |
TCP (PRFileDesc *accepted_fd, bool) | |
Protected constructor to be used by TCPServer to create TCP connections. | |
Static Protected Member Functions | |
static TCP::pointer | create (PRFileDesc *accepted_fd, bool) |
static TCP::pointer | create (PRFileDesc *accepted_fd, bool) |
static TCP::pointer | create (PRFileDesc *accepted_fd, bool) |
Friends | |
class | TCPServer |
Conexus::NSPR::TCP::TCP | ( | PRFileDesc * | accepted_fd, | |
bool | ||||
) | [protected] |
Conexus::NSPR::TCP::TCP | ( | PRFileDesc * | accepted_fd, | |
bool | ||||
) | [protected] |
Conexus::NSPR::TCP::TCP | ( | PRFileDesc * | accepted_fd, | |
bool | ||||
) | [protected] |
Data::pointer Conexus::NSPR::TCP::read_data | ( | long int | timeout, | |
size_t | s = 0 | |||
) | throw ( read_exception ) [protected, virtual] |
Receives a single datagram from the TCP socket up to s bytes in size; allocates any memory necessary as a smart pointer contained in the returned Data object.
If s = 0 then receives the next pending datagram, however large it may be.
Reimplemented from Conexus::NSPR::Socket.
virtual Data::pointer Conexus::NSPR::TCP::read | ( | size_t | s = -1 |
) | throw ( read_exception ) [virtual] |
Receives a single datagram from the TCP socket up to s bytes in size; allocates any memory necessary as a smart pointer contained in the returned Data object.
If s < 0 then receives the next pending datagram, however large it may be.
Reimplemented from Conexus::Endpoint.
virtual Data::pointer Conexus::NSPR::TCP::read | ( | size_t | s = -1 |
) | throw ( read_exception ) [virtual] |
Receives a single datagram from the TCP socket up to s bytes in size; allocates any memory necessary as a smart pointer contained in the returned Data object.
If s < 0 then receives the next pending datagram, however large it may be.
Reimplemented from Conexus::Endpoint.