Anope IRC Services  Version 2.0
Data Structures | Public Member Functions
UplinkSocket Class Reference

#include <uplink.h>

Inheritance diagram for UplinkSocket:
Inheritance graph
[legend]
Collaboration diagram for UplinkSocket:
Collaboration graph
[legend]

Data Structures

class  Message
 

Public Member Functions

 UplinkSocket ()
 
 ~UplinkSocket ()
 
bool ProcessRead () anope_override
 
void OnConnect () anope_override
 
void OnError (const Anope::string &) anope_override
 
- Public Member Functions inherited from ConnectionSocket
void Connect (const Anope::string &TargetHost, int Port)
 
bool Process () anope_override
 
void ProcessError () anope_override
 
- 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 BufferedSocket
 BufferedSocket ()
 
virtual ~BufferedSocket ()
 
bool ProcessWrite () anope_override
 
const Anope::string GetLine ()
 
void Write (const char *message,...)
 
void Write (const Anope::string &message)
 
int ReadBufferLen () const
 
int WriteBufferLen () const
 

Additional Inherited Members

- Data Fields inherited from ConnectionSocket
sockaddrs conaddr
 
- Data Fields inherited from Socket
std::bitset< SF_SIZEflags
 
sockaddrs bindaddr
 
SocketIOio
 
- Protected Member Functions inherited from BufferedSocket
virtual void Write (const char *buffer, size_t l)
 
- Protected Attributes inherited from Socket
int sock
 
bool ipv6
 
- Protected Attributes inherited from BufferedSocket
Anope::string read_buffer
 
Anope::string write_buffer
 
int recv_len
 

Detailed Description

Definition at line 25 of file uplink.h.

Constructor & Destructor Documentation

UplinkSocket::UplinkSocket ( )

Definition at line 61 of file uplink.cpp.

UplinkSocket::~UplinkSocket ( )

Member Function Documentation

void UplinkSocket::OnConnect ( )
virtual

Called on a successful connect

Reimplemented from ConnectionSocket.

Definition at line 132 of file uplink.cpp.

References Anope::CurrentUplink, FOREACH_MOD, IRCD, LOG_TERMINAL, and IRCDProto::SendConnect().

void UplinkSocket::OnError ( const Anope::string error)
virtual

Called when a connection is not successful

Parameters
errorThe error

Reimplemented from ConnectionSocket.

Definition at line 139 of file uplink.cpp.

References Anope::CurrentUplink, Anope::string::empty(), Socket::flags, LOG_TERMINAL, and SF_CONNECTED.

bool UplinkSocket::ProcessRead ( )
virtual

Called when there is something to be received for this socket

Returns
true on success, false to drop this socket

Reimplemented from BufferedSocket.

Definition at line 121 of file uplink.cpp.

References BufferedSocket::GetLine(), Anope::Process(), BufferedSocket::ProcessRead(), and User::QuitUsers().


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