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

36 lines
935 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-17 10:25:34 +01:00
ClientObject(Oyster::Network::NetworkClient* client);
virtual~ClientObject();
2013-12-12 09:33:59 +01:00
2013-12-18 08:44:10 +01:00
void SetPostbox(Oyster::IPostBox<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
private:
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-17 10:25:34 +01:00
Utility::DynamicMemory::SmartPointer<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