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

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

Managermanager
 
Packetpacket
 
unsigned char packet_buffer [524]
 
int length
 

Additional Inherited Members

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

Detailed Description

Definition at line 467 of file m_dns.cpp.

Constructor & Destructor Documentation

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

Definition at line 475 of file m_dns.cpp.

References sockaddrs::addr(), and LOG_DEBUG_2.

TCPSocket::Client::~Client ( )
inline

Definition at line 481 of file m_dns.cpp.

References LOG_DEBUG_2.

Member Function Documentation

bool TCPSocket::Client::ProcessRead ( )
inlinevirtual

Called when there is something to be received for this socket

Returns
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.

bool TCPSocket::Client::ProcessWrite ( )
inlinevirtual

Called when the socket is ready to be written to

Returns
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.

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

Implements DNS::ReplySocket.

Definition at line 490 of file m_dns.cpp.

References SocketEngine::Change(), and SF_WRITABLE.

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

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

int TCPSocket::Client::length
private

Definition at line 472 of file m_dns.cpp.

Manager* TCPSocket::Client::manager
private

Definition at line 469 of file m_dns.cpp.

Packet* TCPSocket::Client::packet
private

Definition at line 470 of file m_dns.cpp.

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

Definition at line 471 of file m_dns.cpp.


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