Anope IRC Services  Version 2.0
uplink.h
Go to the documentation of this file.
1 /*
2  *
3  * (C) 2003-2014 Anope Team
4  * Contact us at team@anope.org
5  *
6  * Please read COPYING and README for further details.
7  *
8  * Based on the original code of Epona by Lara.
9  * Based on the original code of Services by Andy Church.
10  *
11  */
12 
13 #ifndef UPLINK_H
14 #define UPLINK_H
15 
16 #include "sockets.h"
17 #include "protocol.h"
18 
19 namespace Uplink
20 {
21  extern void Connect();
22 }
23 
24 /* This is the socket to our uplink */
26 {
27  public:
28  UplinkSocket();
29  ~UplinkSocket();
32  void OnError(const Anope::string &) anope_override;
33 
34  /* A message sent over the uplink socket */
36  {
38  std::stringstream buffer;
39 
40  public:
41  Message();
42  Message(const MessageSource &);
43  ~Message();
44  template<typename T> Message &operator<<(const T &val)
45  {
46  this->buffer << val;
47  return *this;
48  }
49  };
50 };
52 
53 #endif // UPLINK_H
54 
#define anope_override
Definition: services.h:56
#define CoreExport
Definition: services.h:62