InspIRCd  2.0
 All Classes Namespaces Functions Variables Typedefs Enumerations
Public Member Functions | List of all members
ThreadSignalSocket Class Reference
Inheritance diagram for ThreadSignalSocket:
BufferedSocket EventHandler StreamSocket classbase EventHandler classbase

Public Member Functions

 ThreadSignalSocket (SocketThread *p, int recvfd, int sendfd)
 
void Notify ()
 
void HandleEvent (EventType et, int errornum)
 
 ThreadSignalSocket (SocketThread *t, int newfd)
 
void OnDataReady ()
 
void OnError (BufferedSocketError)
 
- Public Member Functions inherited from BufferedSocket
 BufferedSocket (int newfd)
 
void DoConnect (const std::string &ipaddr, int aport, unsigned long maxtime, const std::string &connectbindip)
 
virtual void OnConnected ()
 
virtual void OnTimeout ()
 
- Public Member Functions inherited from StreamSocket
ModuleGetIOHook ()
 
void AddIOHook (Module *m)
 
void DelIOHook ()
 
virtual void DoRead ()
 
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
 
virtual void Close ()
 
virtual CullResult cull ()
 
- Public Member Functions inherited from EventHandler
int GetFd () const
 
int GetEventMask () const
 
void SetFd (int FD)
 
 EventHandler ()
 
virtual ~EventHandler ()
 

Additional Inherited Members

- Public Attributes inherited from BufferedSocket
SocketTimeoutTimeout
 
BufferedSocketState state
 
- Protected Member Functions inherited from BufferedSocket
virtual void DoWrite ()
 
BufferedSocketError BeginConnect (const irc::sockets::sockaddrs &dest, const irc::sockets::sockaddrs &bind, unsigned long timeout)
 
BufferedSocketError BeginConnect (const std::string &ipaddr, int aport, unsigned long maxtime, const std::string &connectbindip)
 
- Protected Attributes inherited from StreamSocket
std::string recvq
 
- Protected Attributes inherited from EventHandler
int fd
 

Member Function Documentation

void ThreadSignalSocket::HandleEvent ( EventType  et,
int  errornum 
)
inlinevirtual

Process an I/O event. You MUST implement this function in your derived class, and it will be called whenever read or write events are received.

Parameters
eteither one of EVENT_READ for read events, EVENT_WRITE for write events and EVENT_ERROR for error events.
errornumThe error code which goes with an EVENT_ERROR.

Implements EventHandler.

void ThreadSignalSocket::OnDataReady ( )
inlinevirtual

When there is data waiting to be read on a socket, the OnDataReady() method is called.

Implements BufferedSocket.

void ThreadSignalSocket::OnError ( BufferedSocketError  e)
inlinevirtual

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

Implements StreamSocket.


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