Public Member Functions

ListenSocket Class Reference

#include <sockets.h>

Inherits Socket.

Inherited by HTTPProvider, ProxyCallbackListener, and TCPSocket.

Collaboration diagram for ListenSocket:
Collaboration graph
[legend]

Public Member Functions

 ListenSocket (const Anope::string &bindip, int port, bool ipv6)
virtual ~ListenSocket ()
bool ProcessRead ()
virtual ClientSocketOnAccept (int fd, const sockaddrs &addr)=0

Detailed Description

Definition at line 358 of file sockets.h.


Constructor & Destructor Documentation

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

Constructor

Parameters:
bindip The IP to bind to
port The port to listen on
ipv6 true for ipv6

Definition at line 486 of file sockets.cpp.

References SocketIO::Bind(), Socket::bindaddr, Socket::GetFD(), Socket::io, Anope::LastError(), sockaddrs::pton(), Socket::SetBlocking(), and Socket::sock.

ListenSocket::~ListenSocket (  )  [virtual]

Definition at line 500 of file sockets.cpp.


Member Function Documentation

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

Called when a connection is accepted

Parameters:
fd The FD for the new connection
addr The sockaddr for where the connection came from
Returns:
The new socket

Implemented in TCPSocket, and ProxyCallbackListener.

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

bool ListenSocket::ProcessRead (  )  [virtual]

Process what has come in from the connection

Returns:
false to destory this socket

Reimplemented from Socket.

Definition at line 504 of file sockets.cpp.

References SocketIO::Accept(), CoreException::GetReason(), and Socket::io.


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