
#include <tcp.h>

Public Types | |
| typedef ConexusPointer< TCP > | pointer |
Public Member Functions | |
| CONEXUS_ENDPOINT_GENERIC_CREATE () | |
| virtual | ~TCP () throw () |
| virtual bool | shutdown (ReadWrite read_write=READ_WRITE) |
| Shut down the entirety or part of a TCP connection. | |
| virtual void | open () throw (open_exception) |
| virtual void | connect () throw ( connect_exception ) |
| virtual void | connect (Address &a) throw ( connect_exception ) |
Static Public Member Functions | |
| static pointer | create (uint16_t port=0) |
| static pointer | create (uint32_t host, uint16_t port) |
| static pointer | create (const std::string &host, uint16_t port) |
Protected Member Functions | |
| TCP (uint32_t host, uint16_t port) | |
| TCP (const std::string &host, uint16_t port) | |
| TCP (PRFileDesc *accepted_fd, bool) | |
| Protected constructor to be used by TCPServer to create TCP connections. | |
| virtual void | on_local_address_changed () |
| virtual void | on_remote_address_changed () |
| virtual size_t | write_data (const Data data, Timeout timeout) throw ( write_exception ) |
| Reimplements the Socket ancestor write_data method to ensure that the socket is connected before trying to send. | |
Static Protected Member Functions | |
| static TCP::pointer | create (PRFileDesc *accepted_fd, bool) |
Friends | |
| class | TCPServer |
| typedef ConexusPointer<TCP> Conexus::NSPR::TCP::pointer |
Reimplemented from Conexus::NSPR::Socket.
| Conexus::NSPR::TCP::TCP | ( | uint32_t | host, | |
| uint16_t | port | |||
| ) | [protected] |
References Conexus::NSPR::Socket::m_remote_address, Conexus::IPv4::Address::set_host(), and Conexus::IPv4::Address::set_port().
Referenced by create().
| Conexus::NSPR::TCP::TCP | ( | const std::string & | host, | |
| uint16_t | port | |||
| ) | [protected] |
| Conexus::NSPR::TCP::~TCP | ( | ) | throw () [virtual] |
| Conexus::NSPR::TCP::TCP | ( | PRFileDesc * | accepted_fd, | |
| bool | ||||
| ) | [protected] |
Protected constructor to be used by TCPServer to create TCP connections.
The second bool parameter is used to differentiate the public method from the private method.
References Conexus::NSPR::FileDescriptor::m_fd, Conexus::Endpoint::m_state, Conexus::Endpoint::set_state_opened(), Conexus::SOCKET_ACCEPTED, Conexus::SOCKET_BOUND, and Conexus::SOCKET_CONNECTED.
| Conexus::NSPR::TCP::CONEXUS_ENDPOINT_GENERIC_CREATE | ( | ) |
| void Conexus::NSPR::TCP::connect | ( | Address & | a | ) | throw ( connect_exception ) [virtual] |
References Conexus::NSPR::Socket::connect().
| void Conexus::NSPR::TCP::connect | ( | ) | throw ( connect_exception ) [virtual] |
| TCP::pointer Conexus::NSPR::TCP::create | ( | PRFileDesc * | accepted_fd, | |
| bool | b | |||
| ) | [static, protected] |
References TCP().
| TCP::pointer Conexus::NSPR::TCP::create | ( | const std::string & | host, | |
| uint16_t | port | |||
| ) | [static] |
References TCP().
| TCP::pointer Conexus::NSPR::TCP::create | ( | uint32_t | host, | |
| uint16_t | port | |||
| ) | [static] |
References TCP().
| TCP::pointer Conexus::NSPR::TCP::create | ( | uint16_t | port = 0 |
) | [static] |
References TCP().
| void Conexus::NSPR::TCP::on_local_address_changed | ( | ) | [protected, virtual] |
Reimplemented from Conexus::NSPR::Socket.
References Conexus::Endpoint::close_and_reopen(), Conexus::NSPR::Socket::is_accepted(), and Conexus::NSPR::Socket::is_bound().
| void Conexus::NSPR::TCP::on_remote_address_changed | ( | ) | [protected, virtual] |
Reimplemented from Conexus::NSPR::Socket.
References Conexus::Endpoint::close_and_reopen(), Conexus::NSPR::Socket::is_accepted(), and Conexus::NSPR::Socket::is_connected().
| void Conexus::NSPR::TCP::open | ( | ) | throw (open_exception) [virtual] |
| bool Conexus::NSPR::TCP::shutdown | ( | ReadWrite | read_write = READ_WRITE |
) | [virtual] |
Shut down the entirety or part of a TCP connection.
| read_write | use enum ReadWrite values to indicate which portion of the TCP connection (READ, WRITE or READWRITE) should be shut down |
References Conexus::NSPR::Socket::is_connected(), Conexus::NSPR::FileDescriptor::m_fd, Conexus::READ, Conexus::READ_WRITE, and Conexus::WRITE.
| size_t Conexus::NSPR::TCP::write_data | ( | const Data | data, | |
| Timeout | timeout | |||
| ) | throw ( write_exception ) [protected, virtual] |
Reimplements the Socket ancestor write_data method to ensure that the socket is connected before trying to send.
Reimplemented from Conexus::NSPR::Socket.
References Conexus::SOCKET_CONNECTED, and Conexus::NSPR::Socket::write_data().
friend class TCPServer [friend] |
1.5.8