incrementIncomingPackets

fun incrementIncomingPackets(opcode: Int, payloadSize: Int)

Increments the incoming packets received from this java.net.InetAddress.

Parameters

opcode

the opcode of the packet which was received. The opcodes correspond to the ones found in the client.

payloadSize

the number of bytes that the payload is made out of. It should be noted that the payload size only includes the payload, and not the 1-2 bytes for the opcode, nor the 1-2 bytes for the value defining the payload size. Both of those values can be retroactively determined, if more accurate metrics are required. In any case, however, due to the TCP protocol having a significant amount of overhead for its packets on-top of it, the metrics would never be truly accurate in terms of the data received.