TcpConnection Class Reference

#include <TcpConnection.h>

Inherits Connection.

Inheritance diagram for TcpConnection:

Inheritance graph
[legend]
Collaboration diagram for TcpConnection:

Collaboration graph
[legend]
List of all members.

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

Detailed Description

Definition at line 22 of file TcpConnection.h.


Constructor & Destructor Documentation

TcpConnection::TcpConnection ( const String host,
const String service 
)

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.


Member Function Documentation

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

Definition at line 73 of file TcpConnection.cpp.

References _status.

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().


Friends And Related Function Documentation

friend class Poller [friend]

Reimplemented from Connection.

Definition at line 27 of file TcpConnection.h.

friend class TcpServer [friend]

Definition at line 28 of file TcpConnection.h.


Member Data Documentation

TcpConnectionStatus TcpConnection::_status [private]

Definition at line 48 of file TcpConnection.h.

Referenced by Poller::poll(), setConnected(), status(), and TcpConnection().


The documentation for this class was generated from the following files:
Generated on Thu Sep 6 20:14:00 2007 for Pylon Application Platform by  doxygen 1.5.1