diff options
Diffstat (limited to 'include/uplink.h')
-rw-r--r-- | include/uplink.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/include/uplink.h b/include/uplink.h new file mode 100644 index 000000000..7f200d426 --- /dev/null +++ b/include/uplink.h @@ -0,0 +1,44 @@ +/* + * + * (C) 2003-2012 Anope Team + * Contact us at team@anope.org + * + * Please read COPYING and README for further details. + * + * Based on the original code of Epona by Lara. + * Based on the original code of Services by Andy Church. + */ + +#ifndef UPLINK_H +#define UPLINK_H + +#include "sockets.h" + +class UplinkSocket : public ConnectionSocket, public BufferedSocket +{ + public: + UplinkSocket(); + ~UplinkSocket(); + bool Read(const Anope::string &); + void OnConnect(); + void OnError(const Anope::string &); + + class CoreExport Message + { + Anope::string source; + std::stringstream buffer; + public: + Message(); + Message(const Anope::string &); + ~Message(); + template<typename T> Message &operator<<(const T &val) + { + this->buffer << val; + return *this; + } + }; +}; +extern UplinkSocket *UplinkSock; + +#endif // UPLINK_H + |