TunnelStateData::Connection Class Reference
Collaboration diagram for TunnelStateData::Connection:

Public Member Functions

 Connection ()
 
 ~Connection ()
 
template<typename Method >
void initConnection (const Comm::ConnectionPointer &aConn, Method method, const char *name, TunnelStateData *tunnelState)
 initiates Comm::Connection ownership, including closure monitoring More...
 
void noteClosure ()
 reacts to the external closure of our connection More...
 
int bytesWanted (int lower=0, int upper=INT_MAX) const
 
void bytesIn (int const &)
 
void setDelayId (DelayId const &)
 
void error (int const xerrno)
 
int debugLevelForError (int const xerrno) const
 
void dataSent (size_t amount)
 
void write (const char *b, int size, AsyncCall::Pointer &callback, FREE *free_func)
 writes 'b' buffer, setting the 'writer' member to 'callback'. More...
 

Public Attributes

int len
 
char * buf
 
AsyncCall::Pointer writer
 pending Comm::Write callback More...
 
uint64_t * size_ptr
 
Comm::ConnectionPointer conn
 The currently connected connection. More...
 
uint8_t delayedLoops
 how many times a read on this connection has been postponed. More...
 
bool dirty
 whether write() has been called (at least once) More...
 
TunnelStateDatareadPending
 
EVHreadPendingFunc
 
DelayId delayId
 

Private Attributes

AsyncCall::Pointer closer
 the registered close handler for the connection More...
 

Detailed Description

Definition at line 130 of file tunnel.cc.

Constructor & Destructor Documentation

◆ Connection()

TunnelStateData::Connection::Connection ( )
inline

Definition at line 134 of file tunnel.cc.

◆ ~Connection()

TunnelStateData::Connection::~Connection ( )

Definition at line 391 of file tunnel.cc.

References buf, eventDelete(), readPending, readPendingFunc, and safe_free.

Member Function Documentation

◆ bytesIn()

void TunnelStateData::Connection::bytesIn ( int const &  count)

◆ bytesWanted()

int TunnelStateData::Connection::bytesWanted ( int  lower = 0,
int  upper = INT_MAX 
) const

Definition at line 466 of file tunnel.cc.

Referenced by TunnelStateData::copyRead().

◆ dataSent()

void TunnelStateData::Connection::dataSent ( size_t  amount)

Definition at line 724 of file tunnel.cc.

References assert, and debugs.

Referenced by TunnelStateData::writeClientDone(), and TunnelStateData::writeServerDone().

◆ debugLevelForError()

int TunnelStateData::Connection::debugLevelForError ( int const  xerrno) const

Definition at line 512 of file tunnel.cc.

References ignoreErrno().

◆ error()

void TunnelStateData::Connection::error ( int const  xerrno)

◆ initConnection()

template<typename Method >
void TunnelStateData::Connection::initConnection ( const Comm::ConnectionPointer aConn,
Method  method,
const char *  name,
TunnelStateData tunnelState 
)

◆ noteClosure()

void TunnelStateData::Connection::noteClosure ( )

Definition at line 757 of file tunnel.cc.

References conn, and debugs.

Referenced by TunnelStateData::clientClosed(), and TunnelStateData::serverClosed().

◆ setDelayId()

void TunnelStateData::Connection::setDelayId ( DelayId const &  newDelay)

Definition at line 1461 of file tunnel.cc.

Referenced by TunnelStateData::connectDone(), switchToTunnel(), and tunnelStart().

◆ write()

void TunnelStateData::Connection::write ( const char *  b,
int  size,
AsyncCall::Pointer callback,
FREE free_func 
)

Definition at line 737 of file tunnel.cc.

References conn, size, and Comm::Write().

Referenced by TunnelStateData::copy(), and TunnelStateData::notePeerReadyToShovel().

Member Data Documentation

◆ buf

◆ closer

AsyncCall::Pointer TunnelStateData::Connection::closer
private

Definition at line 181 of file tunnel.cc.

◆ conn

◆ delayedLoops

uint8_t TunnelStateData::Connection::delayedLoops

◆ delayId

DelayId TunnelStateData::Connection::delayId

Definition at line 176 of file tunnel.cc.

Referenced by TunnelStateData::establishTunnelThruProxy().

◆ dirty

bool TunnelStateData::Connection::dirty

◆ len

◆ readPending

TunnelStateData* TunnelStateData::Connection::readPending

◆ readPendingFunc

EVH* TunnelStateData::Connection::readPendingFunc

◆ size_ptr

uint64_t* TunnelStateData::Connection::size_ptr

Definition at line 163 of file tunnel.cc.

Referenced by TunnelStateData::TunnelStateData().

◆ writer


The documentation for this class was generated from the following file:

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors