#include <TcpSockConnector.h>
Public Types | |
typedef TcpSockTransport< Channel > | TransportType |
Public Member Functions | |
TcpSockTransport (Connector *c) | |
std::string | host_addr (void) |
int | port (void) |
Status | get_my_ip (std::string &addr) |
get local ip addr | |
Status | get_map_index (ConnInfo &addr) |
return ip addr as the index of conn_map_ | |
Status | open (ConnInfo ci) |
start listening at addr(ci) for remote connections | |
Status | close (void) |
Status | connect (ConnInfo addr, ConnHandler *&conn_handler) |
actively connect to remote channel | |
Status | disconnect (ConnInfo addr) |
Static Public Member Functions | |
static Interface_Type | type (void) |
Private Types | |
typedef ConnHandler< Channel, TcpSockTransport< Channel > > | ConnHandler |
typedef Connector< Channel, TcpSockTransport< Channel > > | Connector |
Private Attributes | |
std::string | host_addr_ |
u_short | port_ |
Tcp_Acceptor< Channel > | tcp_acceptor_ |
Tcp_Connector< Channel > | tcp_connector_ |
Definition at line 161 of file TcpSockConnector.h.
|
Definition at line 163 of file TcpSockConnector.h. |
|
Reimplemented in channel::Connector< Channel, TcpSockTransport< Channel > >, and channel::Connector< Channel, TcpSockTransport< Channel > >. Definition at line 162 of file TcpSockConnector.h. |
|
Definition at line 176 of file TcpSockConnector.h. |
|
Definition at line 178 of file TcpSockConnector.h. References channel::TcpSockTransport< Channel >::port_, channel::TcpSockTransport< Channel >::tcp_acceptor_, channel::TcpSockTransport< Channel >::tcp_connector_, and channel::UNDEFINED_TCP_PORT. |
|
Reimplemented in channel::Connector< Channel, TcpSockTransport< Channel > >. Definition at line 248 of file TcpSockConnector.h. References channel::SUCCESS, and channel::UNDEFINED_TCP_PORT. |
|
actively connect to remote channel
Definition at line 256 of file TcpSockConnector.h. References channel::ConnInfo::dump(), channel::FAILURE, channel::ConnInfo::ip(), channel::ConnInfo::port(), and channel::SUCCESS. |
|
Definition at line 275 of file TcpSockConnector.h. References channel::SUCCESS. |
|
return ip addr as the index of conn_map_
Definition at line 211 of file TcpSockConnector.h. References channel::FAILURE, channel::ConnInfo::get_host_addr(), channel::TcpSockTransport< Channel >::get_my_ip(), channel::ConnInfo::ip(), channel::ConnInfo::port(), and channel::SUCCESS. |
|
get local ip addr
Definition at line 191 of file TcpSockConnector.h. References channel::FAILURE, channel::TcpSockTransport< Channel >::host_addr(), and channel::SUCCESS. Referenced by channel::TcpSockTransport< Channel >::get_map_index(). |
|
Definition at line 187 of file TcpSockConnector.h. References channel::TcpSockTransport< Channel >::host_addr_. Referenced by channel::TcpSockTransport< Channel >::get_my_ip(), and channel::RemoteInterface< Channel, Transport >::send2remote_chan_info(). |
|
start listening at addr(ci) for remote connections
Definition at line 226 of file TcpSockConnector.h. References channel::FAILURE, channel::ConnInfo::port(), channel::SUCCESS, and channel::UNDEFINED_TCP_PORT. |
|
Definition at line 188 of file TcpSockConnector.h. References channel::TcpSockTransport< Channel >::port_. Referenced by channel::RemoteInterface< Channel, Transport >::send2remote_chan_info(). |
|
Reimplemented in channel::Connector< Channel, TcpSockTransport< Channel > >. Definition at line 184 of file TcpSockConnector.h. References channel::INET_SOCK. |
|
Definition at line 167 of file TcpSockConnector.h. Referenced by channel::TcpSockTransport< Channel >::host_addr(). |
|
Definition at line 168 of file TcpSockConnector.h. Referenced by channel::TcpSockTransport< Channel >::port(), and channel::TcpSockTransport< Channel >::TcpSockTransport(). |
|
Definition at line 170 of file TcpSockConnector.h. Referenced by channel::TcpSockTransport< Channel >::TcpSockTransport(). |
|
Definition at line 172 of file TcpSockConnector.h. Referenced by channel::TcpSockTransport< Channel >::TcpSockTransport(). |