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

#include <socket.h>

Inheritance diagram for ListenSocket:
EventHandler Cullable insp::uncopiable


class  IOHookProvRef

Public Types

typedef std::array< IOHookProvRef, 2 > IOHookProvList

Public Member Functions

 ListenSocket (std::shared_ptr< ConfigTag > tag, const irc::sockets::sockaddrs &bind_to)
 ~ListenSocket () override
void OnEventHandlerRead () override
void ResetIOHookProvider ()
- Public Member Functions inherited from EventHandler
int GetFd () const
bool HasFd () const
int GetEventMask () const
void SetFd (int FD)
 EventHandler ()
virtual void OnEventHandlerWrite ()
virtual void OnEventHandlerError (int errornum)
- Public Member Functions inherited from Cullable
virtual ~Cullable ()
virtual Result Cull ()

Public Attributes

std::shared_ptr< ConfigTagbind_tag
const irc::sockets::sockaddrs bind_sa
IOHookProvList iohookprovs

Additional Inherited Members

- Protected Member Functions inherited from Cullable
 Cullable ()
- 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 ( std::shared_ptr< 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 ( )

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: