libfluid
The ONF OpenFlow driver
Public Member Functions | List of all members
fluid_base::BaseOFHandler Class Referenceabstract

#include <BaseOFConnection.hh>

Inheritance diagram for fluid_base::BaseOFHandler:
fluid_base::BaseOFServer fluid_base::OFServer

Public Member Functions

virtual void base_connection_callback (BaseOFConnection *conn, BaseOFConnection::Event event_type)=0
 
virtual void base_message_callback (BaseOFConnection *conn, void *data, size_t len)=0
 
virtual void free_data (void *data)=0
 

Detailed Description

BaseOFHandler is an abstract class. Its methods must be implemented by classes that deal with BaseOFConnection events (usually classes that manage one or more BaseOFConnection objects).

Member Function Documentation

virtual void fluid_base::BaseOFHandler::base_connection_callback ( BaseOFConnection conn,
BaseOFConnection::Event  event_type 
)
pure virtual

Callback for connection events.

This method blocks the event loop on which the connection is running, preventing other connection's events from being handled. If you want to perform a very long operation, try to queue it and return.

The implementation must be thread-safe, because it may be called by several EventLoop instances, each running in a thread.

Parameters
connthe BaseOFConnection on which the message was received
event_typethe event type (see #BaseOFConnectionEvent)

Implemented in fluid_base::OFServer, and fluid_base::BaseOFServer.

virtual void fluid_base::BaseOFHandler::base_message_callback ( BaseOFConnection conn,
void *  data,
size_t  len 
)
pure virtual

Callback for new messages.

This method blocks the event loop on which the connection is running, preventing other connection's events from being handled. If you want to perform a very long operation, try to queue it and return.

The implementation must be thread-safe, because it may be called by several EventLoop instances, each running in a thread.

The message data will not be freed. To free it, you should call BaseOFConnection::free_data when you are done with it.

Parameters
connthe BaseOFConnection on which the message was received
databinary message data
lenmessage length

Implemented in fluid_base::OFServer, and fluid_base::BaseOFServer.

virtual void fluid_base::BaseOFHandler::free_data ( void *  data)
pure virtual

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