2014-07-06 19:54:47 -04:00
|
|
|
#pragma once
|
|
|
|
#include "stdafx.h"
|
|
|
|
#include "GameConnection.h"
|
|
|
|
#include "IControlDevice.h"
|
|
|
|
#include "IGameBroadcaster.h"
|
|
|
|
|
|
|
|
class GameServerConnection : public GameConnection, public IControlDevice
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
int _controllerPort;
|
|
|
|
list<uint8_t> _inputData;
|
|
|
|
IGameBroadcaster* _gameBroadcaster;
|
|
|
|
bool _handshakeCompleted = false;
|
|
|
|
|
|
|
|
protected:
|
2014-07-09 19:05:07 -04:00
|
|
|
void ProcessMessage(NetMessage* message);
|
2014-07-06 19:54:47 -04:00
|
|
|
|
|
|
|
public:
|
2014-07-09 19:05:07 -04:00
|
|
|
GameServerConnection(shared_ptr<Socket> socket, int controllerPort, IGameBroadcaster* gameBroadcaster);
|
|
|
|
~GameServerConnection();
|
2014-07-06 19:54:47 -04:00
|
|
|
|
2014-07-09 19:05:07 -04:00
|
|
|
void SendGameState();
|
|
|
|
void SendGameInformation();
|
|
|
|
void SendMovieData(uint8_t state, uint8_t port);
|
2014-07-06 19:54:47 -04:00
|
|
|
|
2014-07-09 19:05:07 -04:00
|
|
|
ButtonState GetButtonState();
|
2014-07-06 19:54:47 -04:00
|
|
|
};
|