class IoTcpUdpReceiver

A base class for I/O TCP/UDP data receiver. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Methods


Detailed Description

The real receiver must inherit from this class and register with the corresponding IoTcpUdp entity to receive the TCP/UDP data and data-related events.

See also: IoTcpUdp.

 IoTcpUdpReceiver ()

IoTcpUdpReceiver

Default constructor.

 ~IoTcpUdpReceiver ()

~IoTcpUdpReceiver

[virtual]

Virtual destructor.

void  recv_event (const string& if_name, const string& vif_name, const IPvX& src_host, uint16_t src_port, const vector<uint8_t>& data)

recv_event

[pure virtual]

Data received event.

Parameters:

if_namethe interface name the packet arrived on, if known. If unknown, then it is an empty string.
vif_namethe vif name the packet arrived on, if known. If unknown, then it is an empty string.
src_hostthe originating host IP address.
src_portthe originating host port number.
datathe data received.
void  inbound_connect_event (const IPvX& src_host, uint16_t src_port, IoTcpUdp* Xnew_io_tcpudp)

inbound_connect_event

[pure virtual]

Inbound connection request received event.

It applies only to TCP sockets.

Parameters:

src_hostthe originating host IP address.
src_portthe originating host port number.
new_io_tcpudpthe handler for the new connection.
void  outgoing_connect_event ()

outgoing_connect_event

[pure virtual]

Outgoing connection request completed event.

It applies only to TCP sockets.

void  error_event (const string& error, bool fatal)

error_event

[pure virtual]

Error occured event.

Parameters:

errora textual description of the error.
fatalindication of whether socket is shutdown because of error.
void  disconnect_event ()

disconnect_event

[pure virtual]

Connection closed by peer event.

It applies only to TCP sockets. This method is not called if the socket is gracefully closed through close().


Generated by: bms on anglepoise.lon.incunabulum.net on Wed Jul 23 10:05:50 2008, using kdoc 2.0a54+XORP.