Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.3 KiB

  1. //===== Copyright c 1996-2009, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //===========================================================================//
  7. #ifndef IMATCHNETWORKMSG_H
  8. #define IMATCHNETWORKMSG_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. struct MM_QOS_t
  13. {
  14. int nPingMsMin; // Minimum round-trip time in ms
  15. int nPingMsMed; // Median round-trip time in ms
  16. float flBwUpKbs; // Bandwidth upstream in kilobytes/s
  17. float flBwDnKbs; // Bandwidth downstream in kilobytes/s
  18. float flLoss; // Average packet loss in percents
  19. };
  20. struct MM_GameDetails_QOS_t
  21. {
  22. void *m_pvData; // Encoded game details
  23. int m_numDataBytes; // Length of game details
  24. int m_nPing; // Average ping in ms
  25. };
  26. abstract_class IMatchNetworkMsgController
  27. {
  28. public:
  29. // To determine host Quality-of-Service
  30. virtual MM_QOS_t GetQOS() = 0;
  31. virtual KeyValues * GetActiveServerGameDetails( KeyValues *pRequest ) = 0;
  32. virtual KeyValues * UnpackGameDetailsFromQOS( MM_GameDetails_QOS_t const *pvQosReply ) = 0;
  33. virtual KeyValues * UnpackGameDetailsFromSteamLobby( uint64 uiLobbyID ) = 0;
  34. virtual void PackageGameDetailsForQOS( KeyValues *pSettings, CUtlBuffer &buf ) = 0;
  35. virtual KeyValues * PackageGameDetailsForReservation( KeyValues *pSettings ) = 0;
  36. };
  37. #endif // IMATCHNETWORKMSG_H