Added utility headers for network interface.
This commit is contained in:
@@ -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
|
||||||
@@ -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
|
||||||
Reference in New Issue
Block a user