Danbias/Code/Game/DanBiasServer/ServerObjects/ClientObject.h

35 lines
885 B
C
Raw Normal View History

2013-12-12 09:33:59 +01:00
#ifndef DANBIASSERVER_CLIENT_OBJECT_H
#define DANBIASSERVER_CLIENT_OBJECT_H
2013-12-13 23:47:16 +01:00
#include "NetworkSession.h"
2013-12-12 09:33:59 +01:00
#include "NetworkClient.h"
2013-12-13 23:47:16 +01:00
#include <PostBox\PostBox.h>
#include <Player.h>
2013-12-12 09:33:59 +01:00
namespace DanBias
{
2013-12-16 09:00:11 +01:00
class ClientObject
:public Oyster::Network::ProtocolRecieverObject
2013-12-12 09:33:59 +01:00
{
public:
2013-12-13 23:47:16 +01:00
ClientObject(const Oyster::Network::NetworkClient& client);
2013-12-12 09:33:59 +01:00
~ClientObject();
2013-12-16 09:09:54 +01:00
void SetPostbox(Oyster::PostBox<NetworkSession::NetEvent>* box);
2013-12-12 09:33:59 +01:00
GameLogic::Player* Logic_Object();
Oyster::Network::NetworkClient* NetClient_Object();
2013-12-13 23:47:16 +01:00
2013-12-16 09:00:11 +01:00
/** This method is NOT threadsafe. */
virtual void ProtocolRecievedCallback(Oyster::Network::CustomNetProtocol& protocol) override;
2013-12-13 23:47:16 +01:00
private:
GameLogic::Player logicPlayer;
2013-12-13 23:47:16 +01:00
Oyster::Network::NetworkClient client;
2013-12-16 09:09:54 +01:00
Oyster::IPostBox<DanBias::NetworkSession::NetEvent>* box;
2013-12-12 09:33:59 +01:00
};
}//End namespace DanBias
#endif // !DANBIASSERVER_CLIENT_OBJECT_H