MasterServer.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Copyright (c) 2014, Oculus VR, Inc.
  3. * All rights reserved.
  4. *
  5. * This source code is licensed under the BSD-style license found in the
  6. * LICENSE file in the root directory of this source tree. An additional grant
  7. * of patent rights can be found in the PATENTS file in the same directory.
  8. *
  9. */
  10. // TOPOLOGY
  11. // Always running
  12. // Active game servers == active clients
  13. #ifndef __MASTER_SERVER_H
  14. #define __MASTER_SERVER_H
  15. #include "MasterCommon.h"
  16. #include "NetworkTypes.h"
  17. /// \ingroup MASTER_SERVER_GROUP
  18. /// \brief implements the master server
  19. class MasterServer : public MasterCommon
  20. {
  21. public:
  22. MasterServer();
  23. ~MasterServer();
  24. protected:
  25. virtual void Update(RakPeerInterface *peer);
  26. virtual bool OnReceive(RakPeerInterface *peer, Packet *packet);
  27. // Event when a packet was tampered with mid-stream. Override.
  28. void OnModifiedPacket(void);
  29. bool PropagateToGame(Packet *packet) const;
  30. void HandleQuery(Packet *packet);
  31. void HandleDelistServer(Packet *packet);
  32. void HandleUpdateServer(Packet *packet);
  33. void HandleRelayedConnectionNotification(Packet *packet);
  34. };
  35. #endif
粤ICP备19079148号