Kea  2.3.2-git
isc::util::io::BaseSocketSessionForwarder Class Referenceabstract

The "base" class of SocketSessionForwarder. More...

#include <socketsession.h>

+ Inheritance diagram for isc::util::io::BaseSocketSessionForwarder:

Public Member Functions

virtual ~BaseSocketSessionForwarder ()
 
virtual void close ()=0
 
virtual void connectToReceiver ()=0
 
virtual void push (int sock, int family, int type, int protocol, const struct sockaddr &local_end, const struct sockaddr &remote_end, const void *data, size_t data_len)=0
 

Protected Member Functions

 BaseSocketSessionForwarder ()
 

Detailed Description

The "base" class of SocketSessionForwarder.

This class defines abstract interfaces of the SocketSessionForwarder class. Although SocketSessionForwarder is not intended to be used in a polymorphic way, it's not easy to use in tests because it will require various low level network operations. So it would be useful if we provide a framework for defining a fake or mock version of it. An application that needs to use SocketSessionForwarder would actually refer to this base class, and tests for the application would define and use a fake version of the forwarder class.

Normal applications are not expected to define and use their own derived version of this base class, while it's not prohibited at the API level.

See description of SocketSessionForwarder for the expected interface.

Definition at line 172 of file socketsession.h.

Constructor & Destructor Documentation

◆ BaseSocketSessionForwarder()

isc::util::io::BaseSocketSessionForwarder::BaseSocketSessionForwarder ( )
inlineprotected

Definition at line 174 of file socketsession.h.

◆ ~BaseSocketSessionForwarder()

virtual isc::util::io::BaseSocketSessionForwarder::~BaseSocketSessionForwarder ( )
inlinevirtual

Definition at line 177 of file socketsession.h.

Member Function Documentation

◆ close()

virtual void isc::util::io::BaseSocketSessionForwarder::close ( )
pure virtual

◆ connectToReceiver()

virtual void isc::util::io::BaseSocketSessionForwarder::connectToReceiver ( )
pure virtual

◆ push()

virtual void isc::util::io::BaseSocketSessionForwarder::push ( int  sock,
int  family,
int  type,
int  protocol,
const struct sockaddr &  local_end,
const struct sockaddr &  remote_end,
const void *  data,
size_t  data_len 
)
pure virtual

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