Photon C++ Client API: TrafficStats Class Reference

Photon C++ Client API

Photon C++ Client API  4.1.12.2
TrafficStats Class Reference
Inheritance diagram for TrafficStats:
Collaboration diagram for TrafficStats:

Public Member Functions

virtual ~TrafficStats (void)
 
int getPackageHeaderSize (void) const
 
int getReliableCommandCount (void) const
 
int getUnreliableCommandCount (void) const
 
int getFragmentCommandCount (void) const
 
int getControlCommandCount (void) const
 
int getTotalPacketCount (void) const
 
int getTotalCommandsInPackets (void) const
 
int getReliableCommandBytes (void) const
 
int getUnreliableCommandBytes (void) const
 
int getFragmentCommandBytes (void) const
 
int getControlCommandBytes (void) const
 
int getTotalCommandCount (void) const
 
int getTotalCommandBytes (void) const
 
int getTotalPacketBytes (void) const
 
int getTimestampOfLastAck (void) const
 
int getTimestampOfLastReliableCommand (void) const
 
virtual Common::JStringtoString (Common::JString &retStr, bool withTypes=false) const
 
- Public Member Functions inherited from Base
virtual ~Base (void)
 
- Public Member Functions inherited from ToString
virtual ~ToString (void)
 
virtual JString typeToString (void) const
 
JString toString (bool withTypes=false) const
 

Additional Inherited Members

- Static Public Member Functions inherited from Base
static void setListener (const BaseListener *baseListener)
 
static int getDebugOutputLevel (void)
 
static bool setDebugOutputLevel (int debugLevel)
 
static const LogFormatOptionsgetLogFormatOptions (void)
 
static void setLogFormatOptions (const LogFormatOptions &options)
 

Detailed Description

Constructor & Destructor Documentation

§ ~TrafficStats()

~TrafficStats ( void  )
virtual

Destructor.

Member Function Documentation

§ getPackageHeaderSize()

int getPackageHeaderSize ( void  ) const
Returns
the byte-size of per-package headers.

§ getReliableCommandCount()

int getReliableCommandCount ( void  ) const
Returns
the reliable commands that are created/received by this client, ignoring repeats (the out command count can be higher that this due to repeats).

§ getUnreliableCommandCount()

int getUnreliableCommandCount ( void  ) const
Returns
the unreliable commands that are created/received by this client.

§ getFragmentCommandCount()

int getFragmentCommandCount ( void  ) const
Remarks
Commands get fragmented, when UDP is used and they are to big to fit into a single UDP packet.
Returns
the fragments for fragmented commands that are created/received by this client.

§ getControlCommandCount()

int getControlCommandCount ( void  ) const
Remarks
The returned value includes connect, disconnect, verify connect, pings and acknowledgments for reliable commands.
Returns
the control commands that are created/received by this client under the hood to administer the connection.

§ getTotalPacketCount()

int getTotalPacketCount ( void  ) const
Returns
the overall packets that are in created/received by this client.

§ getTotalCommandsInPackets()

int getTotalCommandsInPackets ( void  ) const
Returns
the overall commands that are created/received by this client. For fragmented commands each fragment counts separately.

§ getReliableCommandBytes()

int getReliableCommandBytes ( void  ) const
Returns
the bytes of the reliable commands that are created/received by this client, ignoring repeats (the count of actually outgoing bytes can be higher than this due to repeats).

§ getUnreliableCommandBytes()

int getUnreliableCommandBytes ( void  ) const
Returns
the bytes of the unreliable commands that are created/received by this client.

§ getFragmentCommandBytes()

int getFragmentCommandBytes ( void  ) const
Remarks
Commands get fragmented, when UDP is used and they are to big to fit into a single UDP packet.
Returns
the bytes of the fragments for fragmented commands that are created/received by this client.

§ getControlCommandBytes()

int getControlCommandBytes ( void  ) const
Remarks
Control commands include connect, disconnect, verify connect, pings and acknowledgments for reliable commands.
Returns
the bytes of the control commands that are created/received by this client under the hood to administer the connection.

§ getTotalCommandCount()

int getTotalCommandCount ( void  ) const

§ getTotalCommandBytes()

int getTotalCommandBytes ( void  ) const

§ getTotalPacketBytes()

int getTotalPacketBytes ( void  ) const
Returns
the count of bytes as traffic, excluding UDP/TCP headers (42 bytes / x bytes).

§ getTimestampOfLastAck()

int getTimestampOfLastAck ( void  ) const
Returns
the timestamp of the last incoming ACK that has been read (every PhotonPeer::getTimePingInterval() milliseconds this client sends a PING which must be ACKd by the server).

§ getTimestampOfLastReliableCommand()

int getTimestampOfLastReliableCommand ( void  ) const
Returns
the timestamp of the last incoming reliable command (every second we expect a PING).

§ toString()

JString & toString ( Common::JString retStr,
bool  withTypes = false 
) const
virtual
Remarks
The cost of this function depends a lot on implementation details of the implementing subclasses, but for container classes this function can become quite expensive, if the instance contains huge amounts of data, as its cost for many container class implementations increases disproportionately high to the size of the payload.
Parameters
retStrreference to a string, to store the return-value in; the information, which is generated by this function, will be attached at the end of any eventually existing previous content of the string
withTypesset to true, to include type information in the generated string
Returns
a JString representation of the instance and its contents for debugging purposes.

Implements ToString.