Kea 2.5.8
isc::util::unittests::MockSocketSessionForwarder Class Reference

Mock socket session forwarder. More...

#include <mock_socketsession.h>

+ Inheritance diagram for isc::util::unittests::MockSocketSessionForwarder:

Public Member Functions

 MockSocketSessionForwarder ()
 
virtual void close ()
 
virtual void connectToReceiver ()
 
void disableClose ()
 
void disableConnect ()
 
void disablePush ()
 
void enableConnect ()
 
void enablePush ()
 
const std::vector< uint8_t > & getPushedData () const
 
int getPushedFamily () const
 
const struct sockaddr & getPushedLocalend () const
 
int getPushedProtocol () const
 
const struct sockaddr & getPushedRemoteend () const
 
int getPushedSock () const
 
int getPushedType () const
 
bool isConnected () const
 
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)
 
- Public Member Functions inherited from isc::util::io::BaseSocketSessionForwarder
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
 

Additional Inherited Members

- Protected Member Functions inherited from isc::util::io::BaseSocketSessionForwarder
 BaseSocketSessionForwarder ()
 

Detailed Description

Mock socket session forwarder.

It emulates the behavior of SocketSessionForwarder without involving network communication, and allowing the tester to customize the behavior and to examine forwarded data afterwards.

Definition at line 31 of file mock_socketsession.h.

Constructor & Destructor Documentation

◆ MockSocketSessionForwarder()

isc::util::unittests::MockSocketSessionForwarder::MockSocketSessionForwarder ( )
inline

Definition at line 35 of file mock_socketsession.h.

Member Function Documentation

◆ close()

virtual void isc::util::unittests::MockSocketSessionForwarder::close ( )
inlinevirtual

Implements isc::util::io::BaseSocketSessionForwarder.

Definition at line 55 of file mock_socketsession.h.

References isc_throw.

◆ connectToReceiver()

virtual void isc::util::unittests::MockSocketSessionForwarder::connectToReceiver ( )
inlinevirtual

Implements isc::util::io::BaseSocketSessionForwarder.

Definition at line 45 of file mock_socketsession.h.

References isc_throw.

◆ disableClose()

void isc::util::unittests::MockSocketSessionForwarder::disableClose ( )
inline

Definition at line 104 of file mock_socketsession.h.

◆ disableConnect()

void isc::util::unittests::MockSocketSessionForwarder::disableConnect ( )
inline

Definition at line 102 of file mock_socketsession.h.

◆ disablePush()

void isc::util::unittests::MockSocketSessionForwarder::disablePush ( )
inline

Definition at line 105 of file mock_socketsession.h.

◆ enableConnect()

void isc::util::unittests::MockSocketSessionForwarder::enableConnect ( )
inline

Definition at line 103 of file mock_socketsession.h.

◆ enablePush()

void isc::util::unittests::MockSocketSessionForwarder::enablePush ( )
inline

Definition at line 106 of file mock_socketsession.h.

◆ getPushedData()

const std::vector< uint8_t > & isc::util::unittests::MockSocketSessionForwarder::getPushedData ( ) const
inline

Definition at line 126 of file mock_socketsession.h.

◆ getPushedFamily()

int isc::util::unittests::MockSocketSessionForwarder::getPushedFamily ( ) const
inline

Definition at line 117 of file mock_socketsession.h.

◆ getPushedLocalend()

const struct sockaddr & isc::util::unittests::MockSocketSessionForwarder::getPushedLocalend ( ) const
inline

Definition at line 120 of file mock_socketsession.h.

References isc::util::io::internal::convertSockAddr().

+ Here is the call graph for this function:

◆ getPushedProtocol()

int isc::util::unittests::MockSocketSessionForwarder::getPushedProtocol ( ) const
inline

Definition at line 119 of file mock_socketsession.h.

◆ getPushedRemoteend()

const struct sockaddr & isc::util::unittests::MockSocketSessionForwarder::getPushedRemoteend ( ) const
inline

Definition at line 123 of file mock_socketsession.h.

References isc::util::io::internal::convertSockAddr().

+ Here is the call graph for this function:

◆ getPushedSock()

int isc::util::unittests::MockSocketSessionForwarder::getPushedSock ( ) const
inline

Definition at line 116 of file mock_socketsession.h.

◆ getPushedType()

int isc::util::unittests::MockSocketSessionForwarder::getPushedType ( ) const
inline

Definition at line 118 of file mock_socketsession.h.

◆ isConnected()

bool isc::util::unittests::MockSocketSessionForwarder::isConnected ( ) const
inline

Definition at line 98 of file mock_socketsession.h.

◆ push()

virtual void isc::util::unittests::MockSocketSessionForwarder::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 
)
inlinevirtual

Implements isc::util::io::BaseSocketSessionForwarder.

Definition at line 66 of file mock_socketsession.h.

References isc::util::io::internal::getSALength(), and isc_throw.

+ Here is the call graph for this function:

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