#include <TCPConvergenceLayer.h>
Although the same class is used in both cases, a particular Connection is either a receiver or a sender, as indicated by the direction variable. Note that to deal with NAT, the side which does the active connect is not necessarily the sender.
Definition at line 116 of file TCPConvergenceLayer.h.
Public Member Functions | |
Connection (TCPConvergenceLayer *cl, TCPLinkParams *params) | |
Constructor for the active connect side of a connection. | |
Connection (TCPConvergenceLayer *cl, TCPLinkParams *params, int fd, in_addr_t addr, u_int16_t port) | |
Constructor for the passive accept side of a connection. | |
virtual | ~Connection () |
Destructor. | |
virtual void | serialize (oasys::SerializeAction *a) |
Virtual from SerializableObject. | |
Protected Member Functions | |
void | recv_data () |
bool | recv_contact_header (int timeout) |
bool | send_bundle (Bundle *bundle) |
bool | recv_bundle () |
bool | handle_reply () |
int | handle_ack () |
bool | send_ack (u_int32_t bundle_id, size_t acked_len) |
bool | send_keepalive () |
TCPLinkParams * | tcp_lparams () |
Utility function to downcast the params_ pointer that's stored in the CLConnection parent class. | |
virtual void | connect () |
Virtual from CLConnection. | |
virtual void | accept () |
Virtual from CLConnection. | |
virtual void | disconnect () |
Virtual from CLConnection. | |
virtual void | initialize_pollfds () |
Virtual from CLConnection. | |
virtual void | handle_poll_activity () |
Virtual from CLConnection. | |
void | send_data () |
virtual from StreamConvergenceLayer::Connection | |
Protected Attributes | |
oasys::TCPClient * | sock_ |
The socket. | |
struct pollfd * | sock_pollfd_ |
Poll structure for the socket. | |
Friends | |
class | TCPConvergenceLayer |
dtn::TCPConvergenceLayer::Connection::Connection | ( | TCPConvergenceLayer * | cl, | |
TCPLinkParams * | params | |||
) |
Constructor for the active connect side of a connection.
dtn::TCPConvergenceLayer::Connection::Connection | ( | TCPConvergenceLayer * | cl, | |
TCPLinkParams * | params, | |||
int | fd, | |||
in_addr_t | addr, | |||
u_int16_t | port | |||
) |
Constructor for the passive accept side of a connection.
virtual dtn::TCPConvergenceLayer::Connection::~Connection | ( | ) | [virtual] |
Destructor.
virtual void dtn::TCPConvergenceLayer::Connection::serialize | ( | oasys::SerializeAction * | a | ) | [virtual] |
Virtual from SerializableObject.
virtual void dtn::TCPConvergenceLayer::Connection::connect | ( | ) | [protected, virtual] |
Virtual from CLConnection.
virtual void dtn::TCPConvergenceLayer::Connection::accept | ( | ) | [protected, virtual] |
Virtual from CLConnection.
virtual void dtn::TCPConvergenceLayer::Connection::disconnect | ( | ) | [protected, virtual] |
Virtual from CLConnection.
virtual void dtn::TCPConvergenceLayer::Connection::initialize_pollfds | ( | ) | [protected, virtual] |
Virtual from CLConnection.
virtual void dtn::TCPConvergenceLayer::Connection::handle_poll_activity | ( | ) | [protected, virtual] |
Virtual from CLConnection.
void dtn::TCPConvergenceLayer::Connection::send_data | ( | ) | [protected] |
virtual from StreamConvergenceLayer::Connection
void dtn::TCPConvergenceLayer::Connection::recv_data | ( | ) | [protected] |
bool dtn::TCPConvergenceLayer::Connection::recv_contact_header | ( | int | timeout | ) | [protected] |
bool dtn::TCPConvergenceLayer::Connection::recv_bundle | ( | ) | [protected] |
bool dtn::TCPConvergenceLayer::Connection::handle_reply | ( | ) | [protected] |
int dtn::TCPConvergenceLayer::Connection::handle_ack | ( | ) | [protected] |
bool dtn::TCPConvergenceLayer::Connection::send_ack | ( | u_int32_t | bundle_id, | |
size_t | acked_len | |||
) | [protected] |
bool dtn::TCPConvergenceLayer::Connection::send_keepalive | ( | ) | [protected] |
TCPLinkParams* dtn::TCPConvergenceLayer::Connection::tcp_lparams | ( | ) | [inline, protected] |
Utility function to downcast the params_ pointer that's stored in the CLConnection parent class.
Definition at line 167 of file TCPConvergenceLayer.h.
References ASSERT, dtn::CLConnection::params_, and tcp_lparams().
Referenced by tcp_lparams().
friend class TCPConvergenceLayer [friend] |
Definition at line 140 of file TCPConvergenceLayer.h.
oasys::TCPClient* dtn::TCPConvergenceLayer::Connection::sock_ [protected] |
struct pollfd* dtn::TCPConvergenceLayer::Connection::sock_pollfd_ [read, protected] |