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

38 lines
1010 B
C
Raw Normal View History

2013-12-12 09:33:59 +01:00
#ifndef DANBIASSERVER_NETWORK_SESSION_H
#define DANBIASSERVER_NETWORK_SESSION_H
#include "Utilities.h"
#include "ClientObject.h"
#include <PlayerProtocols.h>
#include <vector>
namespace DanBias
{
class NetworkSession
{
public:
NetworkSession();
~NetworkSession();
void AttachClient(Utility::DynamicMemory::SmartPointer<Oyster::Network::NetworkClient> client);
void DetachClient(Utility::DynamicMemory::SmartPointer<Oyster::Network::NetworkClient> client);
void DetachClient(short ID);
void Kick(Utility::DynamicMemory::SmartPointer<Oyster::Network::NetworkClient> client);
void Kick();
2013-12-12 10:36:55 +01:00
void Send(Oyster::Network::CustomNetProtocol& protocol);
void Send(Oyster::Network::CustomNetProtocol& protocol, int ID);
2013-12-12 09:33:59 +01:00
//TODO: Do more lobby features
protected:
Oyster::Network::NetworkClient* operator[](int Identification);
private:
std::vector<Utility::DynamicMemory::SmartPointer<ClientObject>> clients;
};
}//End namespace DanBias
#endif // !DANBIASSERVER_NETWORK_SESSION_H