Added utility headers for network interface.

This commit is contained in:
stiffly
2015-12-07 16:11:27 +01:00
parent 3bfd08e780
commit d8d63f804a
2 changed files with 32 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
#ifndef MessageType_h__
#define MessageType_h__
// Message types used by both server and client.
// Used to determine what type of message was sent.
enum class MessageType
{
Connect,
Disconnect,
ClientPing,
ServerPing,
Message,
Snapshot,
Event,
};
#endif
+15
View File
@@ -0,0 +1,15 @@
#ifndef MessageType_h__
#define MessageType_h__
#include <boost/asio.hpp>
#include <queue>
#define BOARDSIZE 16
#define MAXCONNECTIONS 8
#define INPUTSIZE 128
typedef boost::shared_ptr<boost::asio::ip::udp::socket> socket_ptr;
typedef boost::shared_ptr<std::string> string_ptr;
typedef boost::shared_ptr<std::queue<string_ptr>> messageQueue_ptr;
#endif