Public Member Functions | Data Fields

ClientSocket Class Reference

#include <sockets.h>

Inherits Socket.

Inherited by HTTPClient, ProxyCallbackListener::ProxyCallbackClient, and TCPSocket::Client.

Collaboration diagram for ClientSocket:
Collaboration graph
[legend]

Public Member Functions

 ClientSocket (ListenSocket *ls, const sockaddrs &addr)
bool Process () anope_override
void ProcessError () anope_override
virtual void OnAccept ()
virtual void OnError (const Anope::string &error)

Data Fields

ListenSocketls
sockaddrs clientaddr

Detailed Description

Definition at line 419 of file sockets.h.


Constructor & Destructor Documentation

ClientSocket::ClientSocket ( ListenSocket ls,
const sockaddrs addr 
)

Constructor

Parameters:
ls Listen socket this connection is from
addr Address the connection came from

Definition at line 65 of file socket_clients.cpp.


Member Function Documentation

void ClientSocket::OnAccept (  )  [virtual]

Called when a client has been accepted() successfully.

Definition at line 96 of file socket_clients.cpp.

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

void ClientSocket::OnError ( const Anope::string error  )  [virtual]

Called when there was an error accepting the client

Definition at line 100 of file socket_clients.cpp.

References LOG_DEBUG.

Referenced by SSLSocketIO::FinishAccept(), and ProcessError().

bool ClientSocket::Process (  )  [virtual]

Called when there either is a read or write event. Used to determine whether or not this socket is connected yet.

Returns:
true to continue to call ProcessRead/ProcessWrite, false to not continue

Reimplemented from Socket.

Definition at line 69 of file socket_clients.cpp.

References SocketIO::FinishAccept(), Socket::flags, CoreException::GetReason(), Socket::io, SF_ACCEPTED, and SF_ACCEPTING.

void ClientSocket::ProcessError (  )  [virtual]

Called when there is an error for this socket

Returns:
true on success, false to drop this socket

Reimplemented from Socket.

Definition at line 87 of file socket_clients.cpp.

References Socket::GetFD(), Anope::LastError(), and OnError().


Field Documentation

Definition at line 425 of file sockets.h.

Referenced by HTTPClient::GetIP(), and MyHTTPClient::Read().

Definition at line 423 of file sockets.h.

Referenced by ModuleProxyScan::~ModuleProxyScan().


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