#include <TcpConnection.h>
Inherits Connection.
Inheritance diagram for TcpConnection:


Public Member Functions | |
| TcpConnection (const String &host, const String &service) | |
| TcpConnection (int socket, struct sockaddr_in *addr) | |
| virtual | ~TcpConnection () |
| int | connect () |
| int | setNonBlock (const bool yes=true) |
| TcpConnectionStatus | status () const |
| SIGNAL (connected) | |
Private Member Functions | |
| int | setConnected () |
Private Attributes | |
| TcpConnectionStatus | _status |
Friends | |
| class | Poller |
| class | TcpServer |
Definition at line 22 of file TcpConnection.h.
Definition at line 25 of file TcpConnection.cpp.
References _status, CSTRING(), DEBUG, ERROR, ERROR_BACKTRACE(), FAILED(), Support::failure(), MSG_SOCKET_CANNOT_CREATE, Connection::setAddress(), Connection::setup(), Socket::socket(), and TCP_CONNECTION_STATUS_DISCONNECTED.
| TcpConnection::TcpConnection | ( | int | socket, | |
| struct sockaddr_in * | addr | |||
| ) |
Definition at line 48 of file TcpConnection.cpp.
References _status, and TCP_CONNECTION_STATUS_DISCONNECTED.
| TcpConnection::~TcpConnection | ( | ) | [virtual] |
Definition at line 53 of file TcpConnection.cpp.
| int TcpConnection::connect | ( | ) |
Definition at line 57 of file TcpConnection.cpp.
References Connection::_peer, Socket::_socket, ERROR, MSG_SOCKET_CANNOT_CONNECT, and OK.
| int TcpConnection::setNonBlock | ( | const bool | yes = true |
) |
Definition at line 65 of file TcpConnection.cpp.
References Socket::_socket, ERROR, MSG_SOCKET_CANNOT_SET_OPTION, and OK.
Referenced by FSh::start().
| TcpConnectionStatus TcpConnection::status | ( | ) | const |
| TcpConnection::SIGNAL | ( | connected | ) |
| int TcpConnection::setConnected | ( | ) | [private] |
Definition at line 80 of file TcpConnection.cpp.
References _status, EMIT, OK, and TCP_CONNECTION_STATUS_CONNECTED.
Referenced by Poller::poll().
friend class Poller [friend] |
friend class TcpServer [friend] |
Definition at line 28 of file TcpConnection.h.
TcpConnectionStatus TcpConnection::_status [private] |
Definition at line 48 of file TcpConnection.h.
Referenced by Poller::poll(), setConnected(), status(), and TcpConnection().
1.5.1