InspIRCd  3.0
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
ListenSocket Class Reference

#include <socket.h>

Inheritance diagram for ListenSocket:
EventHandler classbase

Classes

class  IOHookProvRef
 

Public Types

typedef TR1NS::array< IOHookProvRef, 2 > IOHookProvList
 

Public Member Functions

 ListenSocket (ConfigTag *tag, const irc::sockets::sockaddrs &bind_to)
 
 ~ListenSocket ()
 
void OnEventHandlerRead () CXX11_OVERRIDE
 
void ResetIOHookProvider ()
 
- Public Member Functions inherited from EventHandler
int GetFd () const
 
int GetEventMask () const
 
void SetFd (int FD)
 
 EventHandler ()
 
virtual ~EventHandler ()
 
virtual void OnEventHandlerWrite ()
 
virtual void OnEventHandlerError (int errornum)
 
- Public Member Functions inherited from classbase
virtual CullResult cull ()
 

Public Attributes

reference< ConfigTagbind_tag
 
const irc::sockets::sockaddrs bind_sa
 
IOHookProvList iohookprovs
 

Additional Inherited Members

- Protected Attributes inherited from EventHandler
int fd
 

Detailed Description

This class handles incoming connections on client ports. It will create a new User for every valid connection and assign it a file descriptor.

Constructor & Destructor Documentation

◆ ListenSocket()

ListenSocket::ListenSocket ( ConfigTag tag,
const irc::sockets::sockaddrs bind_to 
)

Create a new listening socket

◆ ~ListenSocket()

ListenSocket::~ListenSocket ( )

Close the socket

Member Function Documentation

◆ OnEventHandlerRead()

void ListenSocket::OnEventHandlerRead ( )
virtual

Handles new connections, called by the socket engine

Implements EventHandler.

◆ ResetIOHookProvider()

void ListenSocket::ResetIOHookProvider ( )

Inspects the bind block belonging to this socket to set the name of the IO hook provider which this socket will use for incoming connections.

Member Data Documentation

◆ iohookprovs

IOHookProvList ListenSocket::iohookprovs

IOHook providers for handling connections on this socket, may be empty.


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