Adding websocket server code, so that a gateway is no longer required. Still kind of untested. Requires websocketpp.

This commit is contained in:
lotodore
2013-09-15 22:54:45 +02:00
parent b0e4018883
commit 8e39432754
19 changed files with 175 additions and 376 deletions
+4 -1
View File
@@ -70,7 +70,7 @@ public:
void Init(const std::string &logDir);
virtual void SignalTermination();
void AddConnection(boost::shared_ptr<boost::asio::ip::tcp::socket> sock);
void AddConnection(boost::shared_ptr<SessionData> sessionData);
void ReAddSession(boost::shared_ptr<SessionData> session, int reason, unsigned gameId);
void MoveSessionToGame(boost::shared_ptr<ServerGame> game, boost::shared_ptr<SessionData> session, bool autoLeave, bool spectateOnly);
void SessionError(boost::shared_ptr<SessionData> session, int errorCode);
@@ -111,6 +111,7 @@ public:
bool SendToLobbyPlayer(unsigned playerId, boost::shared_ptr<NetPacket> packet);
u_int32_t GetNextSessionId();
u_int32_t GetNextUniquePlayerId();
u_int32_t GetNextGameId();
ServerCallback &GetCallback();
@@ -127,6 +128,8 @@ public:
boost::shared_ptr<ServerDBInterface> GetDatabase();
ServerBanManager &GetBanManager();
SessionDataCallback &GetSessionDataCallback();
protected:
typedef std::deque<boost::shared_ptr<boost::asio::ip::tcp::socket> > ConnectQueue;