summaryrefslogtreecommitdiff
path: root/include/uplink.h
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-02-14 15:13:27 -0500
committerAdam <Adam@anope.org>2012-02-14 15:13:27 -0500
commita9772cde21407c89abd161d51aff45267f87b1fb (patch)
tree9e57ba6c121d3843888917d968dd4f5d030b57cf /include/uplink.h
parent086790d6331357022f4da17c76b26b9fc6e2ad90 (diff)
Clean up and reorganize our header files
Diffstat (limited to 'include/uplink.h')
-rw-r--r--include/uplink.h44
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
+