class FinderTcpBase


 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Methods

Protected Methods

Protected Members


Detailed Description

 FinderTcpBase (EventLoop& e, XorpFd fd)

FinderTcpBase

 ~FinderTcpBase ()

~FinderTcpBase

[virtual]

void  read_event (int errval, const uint8_t* data, uint32_t data_bytes)

read_event

[pure 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.
void  set_read_enabled (bool en)

set_read_enabled

Control whether read events can occur.

Parameters:

enboolean value with true corresponding to read enabled.
bool  read_enabled ()

read_enabled

[const]

Determine whether read events can occur.

Returns: true if read events are enabled.

bool  write_data (const uint8_t* data, uint32_t data_bytes)

write_data

Write data on TCP connection. To avoid an unnecessary data copy, the client is expected to ensure the data is valid until departure_event is called with the corresponding data pointer.

Parameters:

datapointer to data.
data_bytessize data pointed to in bytes.

Returns: true if data accepted for writing, false if no buffer space is available at this time.

bool  write_data (const iovec* iov, uint32_t iovcnt)

write_data

void  write_event (int errval, const uint8_t* data, uint32_t data_bytes)

write_event

[pure 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.
void  close_event ()

close_event

[virtual]

Method that may be implemented by derived classes for detecting when the underlying socket is closed.

void  error_event ()

error_event

[virtual]

void  close ()

close

bool  closed ()

closed

[const]

 FinderTcpBase (const FinderTcpBase&)

FinderTcpBase

[protected]

FinderTcpBase&  operator= (const FinderTcpBase&)

operator=

[protected]

void  read_callback (AsyncFileOperator::Event, const uint8_t*, size_t, size_t)

read_callback

[protected]

void  write_callback (AsyncFileOperator::Event, const uint8_t*, size_t, size_t)

write_callback

[protected]

XorpFd _sock

_sock

[protected]

vector<uint8_t> _input_buffer

_input_buffer

[protected]

AsyncFileReader _reader

_reader

[protected]

AsyncFileWriter _writer

_writer

[protected]

uint32_t _isize

_isize

[protected]

uint32_t _osize

_osize

[protected]


Generated by: pavlin on possum.icir.org on Wed Mar 21 11:22:46 2007, using kdoc $.