InspIRCd  3.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
IOHookMiddle Class Reference
Inheritance diagram for IOHookMiddle:
IOHook classbase

Public Member Functions

 IOHookMiddle (IOHookProvider *provider)
 
const StreamSocket::SendQueueGetSendQ () const
 
IOHookGetNextHook () const
 
void SetNextHook (IOHook *hook)
 
- Public Member Functions inherited from IOHook
 IOHook (IOHookProvider *provider)
 
virtual int OnStreamSocketWrite (StreamSocket *sock, StreamSocket::SendQueue &sendq)=0
 
virtual void OnStreamSocketClose (StreamSocket *sock)=0
 
virtual int OnStreamSocketRead (StreamSocket *sock, std::string &recvq)=0
 
- Public Member Functions inherited from classbase
virtual CullResult cull ()
 

Static Public Member Functions

static IOHookMiddleToMiddleHook (IOHook *hook)
 

Protected Member Functions

std::string & GetRecvQ ()
 
StreamSocket::SendQueueGetSendQ ()
 

Friends

class StreamSocket
 

Additional Inherited Members

- Public Attributes inherited from IOHook
IOHookProvider *const prov
 

Constructor & Destructor Documentation

◆ IOHookMiddle()

IOHookMiddle::IOHookMiddle ( IOHookProvider provider)
inline

Constructor

Parameters
providerIOHookProvider that creates this object

Member Function Documentation

◆ GetNextHook()

IOHook* IOHookMiddle::GetNextHook ( ) const
inline

Get the next IOHook in the chain

Returns
Next hook in the chain or NULL if this is the last hook

◆ GetRecvQ()

std::string& IOHookMiddle::GetRecvQ ( )
inlineprotected

Get all queued up data which has not yet been passed up the hook chain

Returns
RecvQ containing the data

◆ GetSendQ() [1/2]

StreamSocket::SendQueue& IOHookMiddle::GetSendQ ( )
inlineprotected

Get all queued up data which is ready to go down the hook chain

Returns
SendQueue containing all data waiting to go down the hook chain

◆ GetSendQ() [2/2]

const StreamSocket::SendQueue& IOHookMiddle::GetSendQ ( ) const
inline

Get all queued up data which is ready to go down the hook chain

Returns
SendQueue containing all data waiting to go down the hook chain

◆ SetNextHook()

void IOHookMiddle::SetNextHook ( IOHook hook)
inline

Set the next hook in the chain

Parameters
hookHook to set as the next hook in the chain

◆ ToMiddleHook()

static IOHookMiddle* IOHookMiddle::ToMiddleHook ( IOHook hook)
inlinestatic

Check if a hook is capable of being the non-last hook in a hook chain and if so, cast it to an IOHookMiddle object.

Parameters
hookIOHook to check
Returns
IOHookMiddle referring to the same hook or NULL

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