BVB Source Codes

CRYENGINE Show GameClientNub.h Source code

Return Download CRYENGINE: download GameClientNub.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. /*************************************************************************
  4.    -------------------------------------------------------------------------
  5.    $Id$
  6.    $DateTime$
  7.    Description: Implements the IGameNub interface for the client side.
  8.  
  9.    -------------------------------------------------------------------------
  10.    History:
  11.    - 11:8:2004   11:30 : Created by Marcio Martins
  12.  
  13. *************************************************************************/
  14. #ifndef __GAMECLIENTNUB_H__
  15. #define __GAMECLIENTNUB_H__
  16.  
  17. #if _MSC_VER > 1000
  18.         #pragma once
  19. #endif
  20.  
  21. #include <CryNetwork/INetwork.h>
  22.  
  23. class CGameClientChannel;
  24. class CGameContext;
  25. struct IGameFramework;
  26.  
  27. class CGameClientNub :
  28.         public IGameNub
  29. {
  30. public:
  31.         CGameClientNub(IGameFramework* pFramework) : m_pGameContext(0), m_pClientChannel(0), m_pFramework(pFramework), m_fInactivityTimeout(300.0f) {};
  32.         virtual ~CGameClientNub();
  33.  
  34.         // IGameNub
  35.         virtual void                 Release();
  36.         virtual SCreateChannelResult CreateChannel(INetChannel* pChannel, const char* pRequest);
  37.         virtual void                 FailedActiveConnect(EDisconnectionCause cause, const char* description);
  38.         // ~IGameNub
  39.  
  40.         void                Disconnect(EDisconnectionCause cause, const char* msg);
  41.         void                SetGameContext(CGameContext* pGameContext) { m_pGameContext = pGameContext; };
  42.         CGameClientChannel* GetGameClientChannel() const               { return m_pClientChannel; }
  43.  
  44.         void                ClientChannelClosed();
  45.  
  46.         void                GetMemoryUsage(ICrySizer* s) const;
  47.         bool                ControlsEntity(EntityId id) const;
  48.  
  49. private:
  50.         CGameContext*       m_pGameContext;
  51.         CGameClientChannel* m_pClientChannel;
  52.         IGameFramework*     m_pFramework;
  53.         float               m_fInactivityTimeout;
  54. };
  55.  
  56. #endif // __GAMECLIENTNUB_H__
  57.  
downloadGameClientNub.h Source code - Download CRYENGINE Source code
Related Source Codes/Software:
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top