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

Public Member Functions

 MyHTTPProvider (Module *c, const Anope::string &n, const Anope::string &i, const unsigned short p, const int t, bool s)
void Tick (time_t) anope_override
ClientSocketOnAccept (int fd, const sockaddrs &addr) anope_override
bool RegisterPage (HTTPPage *page) anope_override
void UnregisterPage (HTTPPage *page) anope_override
HTTPPageFindPage (const Anope::string &pname)
- Public Member Functions inherited from HTTPProvider
 HTTPProvider (Module *c, const Anope::string &n, const Anope::string &i, const unsigned short p, bool s)
const Anope::stringGetIP () const
unsigned short GetPort () const
bool IsSSL () const
- Public Member Functions inherited from ListenSocket
 ListenSocket (const Anope::string &bindip, int port, bool ipv6)
virtual ~ListenSocket ()
bool ProcessRead ()
- 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)
virtual bool Process ()
virtual bool ProcessWrite ()
virtual void ProcessError ()
- Public Member Functions inherited from Service
 Service (Module *o, const Anope::string &t, const Anope::string &n)
virtual ~Service ()
void Register ()
void Unregister ()
- Public Member Functions inherited from Base
 Base ()
virtual ~Base ()
void AddReference (ReferenceBase *r)
void DelReference (ReferenceBase *r)
- 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

Private Attributes

int timeout
std::map< Anope::string,
HTTPPage * > 
std::list< Reference
< MyHTTPClient > > 

Additional Inherited Members

- Static Public Member Functions inherited from Service
static ServiceFindService (const Anope::string &t, const Anope::string &n)
static std::vector< Anope::stringGetServiceKeys (const Anope::string &t)
static void AddAlias (const Anope::string &t, const Anope::string &n, const Anope::string &v)
static void DelAlias (const Anope::string &t, const Anope::string &n)
- Data Fields inherited from HTTPProvider
Anope::string ext_ip
std::vector< Anope::stringext_headers
- Data Fields inherited from Socket
std::bitset< SF_SIZEflags
sockaddrs bindaddr
- Data Fields inherited from Service
Anope::string type
Anope::string name
- Protected Attributes inherited from Socket
int sock
bool ipv6

Detailed Description

Definition at line 289 of file m_httpd.cpp.

Constructor & Destructor Documentation

MyHTTPProvider::MyHTTPProvider ( Module c,
const Anope::string n,
const Anope::string i,
const unsigned short  p,
const int  t,
bool  s 

Definition at line 296 of file m_httpd.cpp.

Member Function Documentation

HTTPPage* MyHTTPProvider::FindPage ( const Anope::string pname)

Implements HTTPProvider.

Definition at line 328 of file m_httpd.cpp.

ClientSocket* MyHTTPProvider::OnAccept ( int  fd,
const sockaddrs addr 

Called when a connection is accepted

fdThe FD for the new connection
addrThe sockaddr for where the connection came from
The new socket

Implements ListenSocket.

Definition at line 311 of file m_httpd.cpp.

bool MyHTTPProvider::RegisterPage ( HTTPPage page)

Implements HTTPProvider.

Definition at line 318 of file m_httpd.cpp.

void MyHTTPProvider::Tick ( time_t  ctime)

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

Implements Timer.

Definition at line 298 of file m_httpd.cpp.

References MyHTTPClient::created, and Anope::CurTime.

void MyHTTPProvider::UnregisterPage ( HTTPPage page)

Implements HTTPProvider.

Definition at line 323 of file m_httpd.cpp.

Field Documentation

std::list<Reference<MyHTTPClient> > MyHTTPProvider::clients

Definition at line 293 of file m_httpd.cpp.

std::map<Anope::string, HTTPPage *> MyHTTPProvider::pages

Definition at line 292 of file m_httpd.cpp.

int MyHTTPProvider::timeout

Definition at line 291 of file m_httpd.cpp.

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