xorp

IoTcpUdpManagerReceiver Class Reference

Class that implements the API for sending TCP/UDP packets and related events to a receiver. More...

#include <io_tcpudp_manager.hh>

Inheritance diagram for IoTcpUdpManagerReceiver:
IoTcpUdpManager XrlIoTcpUdpManager

List of all members.

Public Member Functions

virtual ~IoTcpUdpManagerReceiver ()
 Virtual destructor.
virtual void recv_event (const string &receiver_name, const string &sockid, const string &if_name, const string &vif_name, const IPvX &src_host, uint16_t src_port, const vector< uint8_t > &data)=0
 Data received event.
virtual void inbound_connect_event (const string &receiver_name, const string &sockid, const IPvX &src_host, uint16_t src_port, const string &new_sockid)=0
 Inbound connection request received event.
virtual void outgoing_connect_event (int family, const string &receiver_name, const string &sockid)=0
 Outgoing connection request completed event.
virtual void error_event (int family, const string &receiver_name, const string &sockid, const string &error, bool fatal)=0
 Error occured event.
virtual void disconnect_event (int family, const string &receiver_name, const string &sockid)=0
 Connection closed by peer event.

Detailed Description

Class that implements the API for sending TCP/UDP packets and related events to a receiver.


Member Function Documentation

virtual void IoTcpUdpManagerReceiver::disconnect_event ( int  family,
const string &  receiver_name,
const string &  sockid 
) [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().

Parameters:
familythe address family (AF_INET or AF_INET6 for IPv4 and IPv6 respectively).
receiver_namethe name of the receiver to send the event to.
sockidunique socket ID.

Implemented in IoTcpUdpManager, and XrlIoTcpUdpManager.

virtual void IoTcpUdpManagerReceiver::error_event ( int  family,
const string &  receiver_name,
const string &  sockid,
const string &  error,
bool  fatal 
) [pure virtual]

Error occured event.

Parameters:
familythe address family (AF_INET or AF_INET6 for IPv4 and IPv6 respectively).
receiver_namethe name of the receiver to send the event to.
sockidunique socket ID.
errora textual description of the error.
fatalindication of whether socket is shutdown because of error.

Implemented in IoTcpUdpManager, and XrlIoTcpUdpManager.

virtual void IoTcpUdpManagerReceiver::inbound_connect_event ( const string &  receiver_name,
const string &  sockid,
const IPvX src_host,
uint16_t  src_port,
const string &  new_sockid 
) [pure virtual]

Inbound connection request received event.

It applies only to TCP sockets.

Parameters:
receiver_namethe name of the receiver to send the event to.
sockidunique socket ID.
src_hostthe originating host IP address.
src_portthe originating host port number.
new_sockidthe new socket ID.

Implemented in IoTcpUdpManager, and XrlIoTcpUdpManager.

virtual void IoTcpUdpManagerReceiver::outgoing_connect_event ( int  family,
const string &  receiver_name,
const string &  sockid 
) [pure virtual]

Outgoing connection request completed event.

It applies only to TCP sockets.

Parameters:
familythe address family (AF_INET or AF_INET6 for IPv4 and IPv6 respectively).
receiver_namethe name of the receiver to send the event to.
sockidunique socket ID.

Implemented in IoTcpUdpManager, and XrlIoTcpUdpManager.

virtual void IoTcpUdpManagerReceiver::recv_event ( const string &  receiver_name,
const string &  sockid,
const string &  if_name,
const string &  vif_name,
const IPvX src_host,
uint16_t  src_port,
const vector< uint8_t > &  data 
) [pure virtual]

Data received event.

Parameters:
receiver_namethe name of the receiver to send the data to.
sockidunique socket ID.
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.

Implemented in IoTcpUdpManager, and XrlIoTcpUdpManager.


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