InspIRCd  3.0
Public Types | Public Member Functions | Public Attributes | List of all members
IOHookProvider Class Referenceabstract
Inheritance diagram for IOHookProvider:
ServiceProvider classbase

Public Types

enum  Type { IOH_UNKNOWN, IOH_SSL }
 

Public Member Functions

 IOHookProvider (Module *mod, const std::string &Name, Type hooktype=IOH_UNKNOWN, bool middle=false)
 
bool IsMiddle () const
 
virtual void OnAccept (StreamSocket *sock, irc::sockets::sockaddrs *client, irc::sockets::sockaddrs *server)=0
 
virtual void OnConnect (StreamSocket *sock)=0
 
- Public Member Functions inherited from ServiceProvider
 ServiceProvider (Module *Creator, const std::string &Name, ServiceType Type)
 
virtual void RegisterService ()
 
void DisableAutoRegister ()
 
- Public Member Functions inherited from classbase
virtual CullResult cull ()
 

Public Attributes

const Type type
 
- Public Attributes inherited from ServiceProvider
ModuleRef creator
 
const std::string name
 
const ServiceType service
 

Constructor & Destructor Documentation

◆ IOHookProvider()

IOHookProvider::IOHookProvider ( Module mod,
const std::string &  Name,
Type  hooktype = IOH_UNKNOWN,
bool  middle = false 
)
inline

Constructor

Parameters
modModule that owns the IOHookProvider
NameName of the provider
hooktypeOne of IOHookProvider::Type
middleTrue if the IOHook instances created by this hook are subclasses of IOHookMiddle, false otherwise

Member Function Documentation

◆ IsMiddle()

bool IOHookProvider::IsMiddle ( ) const
inline

Check if the IOHook provided can appear in the non-last position of a hook chain. That is the case if and only if the IOHook instances created are subclasses of IOHookMiddle.

Returns
True if the IOHooks provided are subclasses of IOHookMiddle

◆ OnAccept()

virtual void IOHookProvider::OnAccept ( StreamSocket sock,
irc::sockets::sockaddrs client,
irc::sockets::sockaddrs server 
)
pure virtual

Called when the provider should hook an incoming connection and act as being on the server side of the connection. This occurs when a bind block has a hook configured and the listener accepts a connection.

Parameters
sockSocket to hook
clientClient IP address and port
serverServer IP address and port

◆ OnConnect()

virtual void IOHookProvider::OnConnect ( StreamSocket sock)
pure virtual

Called when the provider should hook an outgoing connection and act as being on the client side of the connection.

Parameters
sockSocket to hook

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