Anope IRC Services  Version 2.0
Public Member Functions | Private Attributes
TCPSocket::Client Class Reference
Inheritance diagram for TCPSocket::Client:
Inheritance graph
Collaboration diagram for TCPSocket::Client:
Collaboration graph

Public Member Functions

 Client (Manager *m, TCPSocket *l, int fd, const sockaddrs &addr)
 ~Client ()
void Tick (time_t) anope_override
void Reply (Packet *p) anope_override
bool ProcessRead () anope_override
bool ProcessWrite () anope_override
- Public Member Functions inherited from ClientSocket
 ClientSocket (ListenSocket *ls, const sockaddrs &addr)
bool Process () anope_override
void ProcessError () anope_override
virtual void OnAccept ()
virtual void OnError (const Anope::string &error)
- 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)
- Public Member Functions inherited from Timer
 Timer (long time_from_now, time_t now=Anope::CurTime, bool repeating=false)
 Timer (Module *creator, long time_from_now, time_t now=Anope::CurTime, bool repeating=false)
virtual ~Timer ()
void SetTimer (time_t t)
time_t GetTimer () const
bool GetRepeat () const
void SetSecs (time_t t)
long GetSecs () const
time_t GetSetTime () const
ModuleGetOwner () const
- Public Member Functions inherited from DNS::ReplySocket
virtual ~ReplySocket ()

Private Attributes

unsigned char packet_buffer [524]
int length

Additional Inherited Members

- Data Fields inherited from ClientSocket
sockaddrs clientaddr
- 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 467 of file m_dns.cpp.

Constructor & Destructor Documentation

◆ Client()

TCPSocket::Client::Client ( Manager m,
TCPSocket l,
int  fd,
const sockaddrs addr 

Definition at line 475 of file m_dns.cpp.

References sockaddrs::addr(), and LOG_DEBUG_2.

◆ ~Client()

TCPSocket::Client::~Client ( )

Definition at line 481 of file m_dns.cpp.

References LOG_DEBUG_2.

Member Function Documentation

◆ ProcessRead()

bool TCPSocket::Client::ProcessRead ( )

Called when there is something to be received for this socket

true on success, false to drop this socket

Reimplemented from Socket.

Definition at line 497 of file m_dns.cpp.

References DNS::Manager::HandlePacket(), and LOG_DEBUG_2.

◆ ProcessWrite()

bool TCPSocket::Client::ProcessWrite ( )

Called when the socket is ready to be written to

true on success, false to drop this socket

Reimplemented from Socket.

Definition at line 517 of file m_dns.cpp.

References SocketEngine::Change(), LOG_DEBUG_2, Packet::Pack(), and SF_WRITABLE.

◆ Reply()

void TCPSocket::Client::Reply ( Packet p)

Implements DNS::ReplySocket.

Definition at line 490 of file m_dns.cpp.

References SocketEngine::Change(), and SF_WRITABLE.

◆ Tick()

void TCPSocket::Client::Tick ( time_t  ctime)

Called when the timer ticks This should be overridden with something useful

Implements Timer.

Definition at line 488 of file m_dns.cpp.

Field Documentation

◆ length

int TCPSocket::Client::length

Definition at line 472 of file m_dns.cpp.

◆ manager

Manager* TCPSocket::Client::manager

Definition at line 469 of file m_dns.cpp.

◆ packet

Packet* TCPSocket::Client::packet

Definition at line 470 of file m_dns.cpp.

◆ packet_buffer

unsigned char TCPSocket::Client::packet_buffer[524]

Definition at line 471 of file m_dns.cpp.

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