xorp

FinderTcpMessenger Class Reference

Inheritance diagram for FinderTcpMessenger:
FinderMessengerBase FinderTcpBase XrlSender NONCOPYABLE

List of all members.

Public Member Functions

 FinderTcpMessenger (EventLoop &e, FinderMessengerManager *mm, XorpFd sock, XrlCmdMap &cmds)
bool send (const Xrl &xrl, const SendCallback &scb)
bool pending () const
 Return true if sender has send requests pending.
void close ()

Protected Types

typedef list< const
FinderMessageBase * > 
OutputQueue

Protected Member Functions

bool read_event (int errval, const uint8_t *data, uint32_t data_bytes)
 Method to be implemented by derived classes that is called when data arrives or an error occurs when processing when data arrives.
void write_event (int errval, const uint8_t *data, uint32_t data_bytes)
 Method to be implemented by derived classes that is called when data writing completes or an error occurs when processing when write.
void close_event ()
 Method that may be implemented by derived classes for detecting when the underlying socket is closed.
void error_event ()
void reply (uint32_t seqno, const XrlError &xe, const XrlArgs *reply_args)
void push_queue ()
void drain_queue ()

Protected Attributes

OutputQueue _out_queue

Static Protected Attributes

static const uint32_t OUTQUEUE_BLOCK_READ_HI_MARK = 6
static const uint32_t OUTQUEUE_BLOCK_READ_LO_MARK = 4

Member Function Documentation

bool FinderTcpMessenger::read_event ( int  errval,
const uint8_t *  data,
uint32_t  data_bytes 
) [protected, virtual]

Method to be implemented by derived classes that is called when data arrives or an error occurs when processing when data arrives.

Parameters:
errvalerror code, values are equivalent to errno.
datapointer to data
data_bytessize of data.
Returns:
true if the data was processed without an error and the connection was kept, otherwise false.

Implements FinderTcpBase.

bool FinderTcpMessenger::send ( const Xrl xrl,
const SendCallback &  scb 
) [virtual]
Parameters:
xrlXrl to be sent.
scbcallback to be invoked with result from Xrl
Returns:
true if Xrl is accepted for sending, false otherwise.

Implements FinderMessengerBase.

void FinderTcpMessenger::write_event ( int  errval,
const uint8_t *  data,
uint32_t  data_bytes 
) [protected, virtual]

Method to be implemented by derived classes that is called when data writing completes or an error occurs when processing when write.

Parameters:
errvalerror code, values are equivalent to errno.

Implements FinderTcpBase.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations