Revised OpenFlow Library  v0.6.0dev
 All Classes Files Functions Variables Friends Groups Pages
Public Member Functions | Friends | List of all members
rofl::csocket_env Interface Referenceabstract

An abstract interface defining the consumer side of a csocket. More...

#include <csocket.h>

Public Member Functions

virtual ~csocket_env ()
 Destructor.
 
virtual void handle_listen (rofl::csocket &socket, int newsd)=0
 Called once a listening socket has accepted a connection request from a remote peer entity. More...
 
virtual void handle_accepted (rofl::csocket &socket)=0
 Called once this csocket entity has succeeded its accept() method. More...
 
virtual void handle_accept_refused (rofl::csocket &socket)=0
 Called once accepting a request from a remote entity failed. More...
 
virtual void handle_connected (rofl::csocket &socket)=0
 Called once a connection request has succeeded its connect() method. More...
 
virtual void handle_connect_refused (rofl::csocket &socket)=0
 Called once a connection request to a remote entity failed. More...
 
virtual void handle_connect_failed (rofl::csocket &socket)=0
 Called once a connection request to a remote entity failed. More...
 
virtual void handle_read (rofl::csocket &socket)=0
 Called once new data is available for reading from the socket. More...
 
virtual void handle_write (rofl::csocket &socket)=0
 Called once the socket accept additional data for sending. More...
 
virtual void handle_closed (rofl::csocket &socket)=0
 Called once the socket has been shutdown and closed. More...
 

Friends

class csocket
 

Detailed Description

An abstract interface defining the consumer side of a csocket.

This class defines an abstract interface for interacting with instances of type csocket. It defines five methods for reception of notifications emitted by specific socket events:

See Also
csocket
Inheritance diagram for rofl::csocket_env:
rofl::common::crofshim rofl::crofbase rofl::crofsock rofl::csocket_openssl rofl::examples::ethswctld::cetherswitch

Member Function Documentation

virtual void rofl::csocket_env::handle_accept_refused ( rofl::csocket socket)
pure virtual

Called once accepting a request from a remote entity failed.

Parameters
socketpointer to csocket instance emitting the notification

Implemented in rofl::csocket_openssl.

virtual void rofl::csocket_env::handle_accepted ( rofl::csocket socket)
pure virtual

Called once this csocket entity has succeeded its accept() method.

Parameters
socketpointer to csocket instance emitting the motification
newsdsocket descriptor of new created Unix socket
raaddress of peer entity

Implemented in rofl::csocket_openssl.

virtual void rofl::csocket_env::handle_closed ( rofl::csocket socket)
pure virtual

Called once the socket has been shutdown and closed.

Parameters
socketpointer to csocket instance emitting the notification
sdsocket descriptor used by the connection

Implemented in rofl::csocket_openssl.

virtual void rofl::csocket_env::handle_connect_failed ( rofl::csocket socket)
pure virtual

Called once a connection request to a remote entity failed.

Parameters
socketpointer to csocket instance emitting the notification
sdsocket descriptor used for connection

Implemented in rofl::csocket_openssl.

virtual void rofl::csocket_env::handle_connect_refused ( rofl::csocket socket)
pure virtual

Called once a connection request to a remote entity failed.

Parameters
socketpointer to csocket instance emitting the notification
sdsocket descriptor used for connection

Implemented in rofl::csocket_openssl.

virtual void rofl::csocket_env::handle_connected ( rofl::csocket socket)
pure virtual

Called once a connection request has succeeded its connect() method.

Parameters
socketpointer to csocket instance emitting the notification

Implemented in rofl::csocket_openssl.

virtual void rofl::csocket_env::handle_listen ( rofl::csocket socket,
int  newsd 
)
pure virtual

Called once a listening socket has accepted a connection request from a remote peer entity.

Parameters
socketpointer to csocket instance emitting the motification
newsdsocket descriptor of new created Unix socket
raaddress of peer entity

Implemented in rofl::csocket_openssl.

virtual void rofl::csocket_env::handle_read ( rofl::csocket socket)
pure virtual

Called once new data is available for reading from the socket.

Parameters
socketpointer to csocket instance emitting the notification
sdsocket descriptor used by the connection

Implemented in rofl::csocket_openssl.

virtual void rofl::csocket_env::handle_write ( rofl::csocket socket)
pure virtual

Called once the socket accept additional data for sending.

Parameters
socketpointer to csocket instance emitting the notification
sdsocket descriptor used by the connection

Implemented in rofl::csocket_openssl.


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