Advertisement
Guest User

Untitled

a guest
Jun 24th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.92 KB | None | 0 0
  1. class INetChannelInfo
  2. {
  3. public:
  4. enum {
  5. GENERIC = 0, // must be first and is default group
  6. LOCALPLAYER, // bytes for local player entity update
  7. OTHERPLAYERS, // bytes for other players update
  8. ENTITIES, // all other entity bytes
  9. SOUNDS, // game sounds
  10. EVENTS, // event messages
  11. USERMESSAGES, // user messages
  12. ENTMESSAGES, // entity messages
  13. VOICE, // voice data
  14. STRINGTABLE, // a stringtable update
  15. MOVE, // client move cmds
  16. STRINGCMD, // string command
  17. SIGNON, // various signondata
  18. TOTAL, // must be last and is not a real group
  19. };
  20. virtual const char *GetName(void) const = 0; // get channel name
  21. virtual const char *GetAddress(void) const = 0; // get channel IP address as string
  22. virtual float GetTime(void) const = 0; // current net time
  23. virtual float GetTimeConnected(void) const = 0; // get connection time in seconds
  24. virtual int GetBufferSize(void) const = 0; // netchannel packet history size
  25. virtual int GetDataRate(void) const = 0; // send data rate in byte/sec
  26. virtual bool IsLoopback(void) const = 0; // true if loopback channel
  27. virtual bool IsTimingOut(void) const = 0; // true if timing out
  28. virtual bool IsPlayback(void) const = 0; // true if demo playback
  29. virtual float GetLatency(int flow) const = 0; // current latency (RTT), more accurate but jittering
  30. virtual float GetAvgLatency(int flow) const = 0; // average packet latency in seconds
  31. virtual float GetAvgLoss(int flow) const = 0; // avg packet loss[0..1]
  32. virtual float GetAvgChoke(int flow) const = 0; // avg packet choke[0..1]
  33. virtual float GetAvgData(int flow) const = 0; // data flow in bytes/sec
  34. virtual float GetAvgPackets(int flow) const = 0; // avg packets/sec
  35. virtual int GetTotalData(int flow) const = 0; // total flow in/out in bytes
  36. virtual int GetSequenceNr(int flow) const = 0; // last send seq number
  37. virtual bool IsValidPacket(int flow, int frame_number) const = 0; // true if packet was not lost/dropped/chocked/flushed
  38. virtual float GetPacketTime(int flow, int frame_number) const = 0; // time when packet was send
  39. virtual int GetPacketBytes(int flow, int frame_number, int group) const = 0; // group size of this packet
  40. virtual bool GetStreamProgress(int flow, int *received, int *total) const = 0; // TCP progress if transmitting
  41. virtual float GetTimeSinceLastReceived(void) const = 0; // get time since last recieved packet in seconds
  42. virtual float GetCommandInterpolationAmount(int flow, int frame_number) const = 0;
  43. virtual void GetPacketResponseLatency(int flow, int frame_number, int *pnLatencyMsecs, int *pnChoke) const = 0;
  44. virtual void GetRemoteFramerate(float *pflFrameTime, float *pflFrameTimeStdDeviation) const = 0;
  45. virtual float GetTimeoutSeconds() const = 0;
  46. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement