InspIRCd  3.0
Public Member Functions | Public Attributes | List of all members
UserIOHandler Class Reference
Inheritance diagram for UserIOHandler:
StreamSocket EventHandler classbase

Public Member Functions

 UserIOHandler (LocalUser *me)
void OnDataReady ()
bool OnSetEndPoint (const irc::sockets::sockaddrs &local, const irc::sockets::sockaddrs &remote)
void OnError (BufferedSocketError error)
void AddWriteBuf (const std::string &data)
void SwapInternals (UserIOHandler &other)
- Public Member Functions inherited from StreamSocket
 StreamSocket (Type sstype=SS_UNKNOWN)
IOHookGetIOHook () const
void AddIOHook (IOHook *hook)
void DelIOHook ()
void DoWrite ()
void OnEventHandlerRead () CXX11_OVERRIDE
void OnEventHandlerWrite () CXX11_OVERRIDE
void OnEventHandlerError (int errcode) CXX11_OVERRIDE
void SetError (const std::string &err)
const std::string & getError () const
void WriteData (const std::string &data)
bool GetNextLine (std::string &line, char delim='\n')
size_t getSendQSize () const
SendQueueGetSendQ ()
virtual void Close ()
void Close (bool writeblock)
CullResult cull () CXX11_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 ()
virtual ~EventHandler ()

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 StreamSocket
void SwapInternals (StreamSocket &other)
- Protected Member Functions inherited from EventHandler
void SwapInternals (EventHandler &other)
- 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.

dataThe data to add to the write buffer

◆ OnDataReady()

void UserIOHandler::OnDataReady ( )

Called when new data is present in recvq

Implements StreamSocket.

◆ OnError()

void UserIOHandler::OnError ( BufferedSocketError  e)

Called when the socket gets an error from socket engine or IO hook

Implements StreamSocket.

◆ OnSetEndPoint()

bool UserIOHandler::OnSetEndPoint ( const irc::sockets::sockaddrs local,
const irc::sockets::sockaddrs remote 

Called when the endpoint addresses are changed.

localThe new local endpoint.
remoteThe new remote endpoint.
true if the connection is still open, false if it has been closed

Reimplemented from StreamSocket.

◆ SwapInternals()

void UserIOHandler::SwapInternals ( UserIOHandler other)

Swaps the internals of this UserIOHandler with another one.

otherA UserIOHandler to swap internals with.

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