]> git.tdb.fi Git - libs/net.git/blobdiff - source/receiver.h
Add protocol framework
[libs/net.git] / source / receiver.h
diff --git a/source/receiver.h b/source/receiver.h
new file mode 100644 (file)
index 0000000..33917cd
--- /dev/null
@@ -0,0 +1,34 @@
+/* $Id$
+
+This file is part of libmspnet
+Copyright © 2009  Mikkosoft Productions, Mikko Rasa
+Distributed under the LGPL
+*/
+
+#ifndef MSP_NET_RECEIVER_H_
+#define MSP_NET_RECEIVER_H_
+
+namespace Msp {
+namespace Net {
+
+class ReceiverBase
+{
+protected:
+       ReceiverBase() { }
+public:
+       virtual ~ReceiverBase() { }
+};
+
+template<typename P>
+class PacketReceiver: public virtual ReceiverBase
+{
+protected:
+       PacketReceiver() { }
+public:
+       virtual void receive(const P &) =0;
+};
+
+} // namespace Net
+} // namespace Msp
+
+#endif