InspIRCd  4.0
Public Member Functions | Public Attributes | List of all members
UserIOHandler Class Reference
Inheritance diagram for UserIOHandler:
StreamSocket EventHandler Cullable insp::uncopiable

Public Member Functions

 UserIOHandler (LocalUser *me)
 
void OnDataReady () override
 
bool OnSetLocalEndPoint (const irc::sockets::sockaddrs &ep) override
 
bool OnSetRemoteEndPoint (const irc::sockets::sockaddrs &ep) override
 
void OnError (BufferedSocketError error) override
 
void AddWriteBuf (const std::string &data)
 
- Public Member Functions inherited from StreamSocket
 StreamSocket (Type sstype=SS_UNKNOWN)
 
IOHookGetIOHook () const
 
void AddIOHook (IOHook *hook)
 
void DelIOHook ()
 
void DoWrite ()
 
void OnEventHandlerRead () override
 
void OnEventHandlerWrite () override
 
void OnEventHandlerError (int errcode) override
 
void SetError (const std::string &err)
 
const std::string & GetError () const
 
void WriteData (const std::string &data)
 
size_t GetSendQSize () const
 
SendQueueGetSendQ ()
 
virtual void Close ()
 
void Close (bool writeblock)
 
Cullable::Result Cull () override
 
IOHookGetModHook (Module *mod) const
 
IOHookGetLastHook () const
 
- Public Member Functions inherited from EventHandler
int GetFd () const
 
bool HasFd () const
 
int GetEventMask () const
 
void SetFd (int FD)
 
 EventHandler ()
 
- Public Member Functions inherited from Cullable
virtual ~Cullable ()
 

Public Attributes

LocalUser *const user
 
- Public Attributes inherited from StreamSocket
const Type type
 

Additional Inherited Members

- Public Types inherited from StreamSocket
enum  Type { SS_UNKNOWN , SS_USER }
 
- Protected Member Functions inherited from Cullable
 Cullable ()
 
- Protected Attributes inherited from StreamSocket
std::string recvq
 
- Protected Attributes inherited from EventHandler
int fd
 

Member Function Documentation

◆ AddWriteBuf()

void UserIOHandler::AddWriteBuf ( const std::string &  data)

Adds to the user's write buffer. You may add any amount of text up to this users sendq value, if you exceed the sendq value, the user will be removed, and further buffer adds will be dropped.

Parameters
dataThe data to add to the write buffer

◆ OnDataReady()

void UserIOHandler::OnDataReady ( )
overridevirtual

Called when new data is present in the receive queue.

Implements StreamSocket.

◆ OnError()

void UserIOHandler::OnError ( BufferedSocketError  e)
overridevirtual

Called when the socket gets an error from socket engine or I/O hook.

Implements StreamSocket.

◆ OnSetLocalEndPoint()

bool UserIOHandler::OnSetLocalEndPoint ( const irc::sockets::sockaddrs ep)
overridevirtual

Called when the local endpoint address is changed.

Parameters
epThe new local endpoint.
Returns
true if the connection is still open, false if it has been closed

Reimplemented from StreamSocket.

◆ OnSetRemoteEndPoint()

bool UserIOHandler::OnSetRemoteEndPoint ( const irc::sockets::sockaddrs ep)
overridevirtual

Called when the remote endpoint address is changed.

Parameters
epThe new remote endpoint.
Returns
true if the connection is still open, false if it has been closed

Reimplemented from StreamSocket.


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