Anope IRC Services  Version 2.0
Public Member Functions
ListenSocket Class Referenceabstract

#include <sockets.h>

Inheritance diagram for ListenSocket:
Inheritance graph
Collaboration diagram for ListenSocket:
Collaboration graph

Public Member Functions

 ListenSocket (const Anope::string &bindip, int port, bool ipv6)
virtual ~ListenSocket ()
bool ProcessRead ()
virtual ClientSocketOnAccept (int fd, const sockaddrs &addr)=0
- Public Member Functions inherited from Socket
 Socket ()
 Socket (int sock, bool ipv6=false, int type=SOCK_STREAM)
virtual ~Socket ()
int GetFD () const
bool IsIPv6 () const
bool SetBlocking (bool state)
void Bind (const Anope::string &ip, int port=0)
virtual bool Process ()
virtual bool ProcessWrite ()
virtual void ProcessError ()

Additional Inherited Members

- Data Fields inherited from Socket
std::bitset< SF_SIZEflags
sockaddrs bindaddr
- Protected Attributes inherited from Socket
int sock
bool ipv6

Detailed Description

Definition at line 363 of file sockets.h.

Constructor & Destructor Documentation

ListenSocket::ListenSocket ( const Anope::string bindip,
int  port,
bool  ipv6 


bindipThe IP to bind to
portThe port to listen on
ipv6true for ipv6

Definition at line 517 of file sockets.cpp.

References Anope::LastError().

ListenSocket::~ListenSocket ( )

Definition at line 531 of file sockets.cpp.

Member Function Documentation

virtual ClientSocket* ListenSocket::OnAccept ( int  fd,
const sockaddrs addr 
pure virtual

Called when a connection is accepted

fdThe FD for the new connection
addrThe sockaddr for where the connection came from
The new socket

Implemented in TCPSocket, MyHTTPProvider, and ProxyCallbackListener.

Referenced by SSLSocketIO::Accept(), and SocketIO::Accept().

bool ListenSocket::ProcessRead ( )

Process what has come in from the connection

false to destory this socket

Reimplemented from Socket.

Definition at line 535 of file sockets.cpp.

References CoreException::GetReason().

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