Any way to get statistics for amount of data sent to each client? #3943
-
I need to track statistics for bandwidth usage, number of clients and hence bandwidth per client. Is there any way to get the amount of data that was sent to a client using |
Beta Was this translation helpful? Give feedback.
Answered by
darrachequesne
May 28, 2021
Replies: 1 comment
-
Hmm, there is currently no built-in way to do that. You could listen to the
Though it might not represent the actual amount, since the payload can then be compressed down the line (it should be OK for WebSocket connections though, if the permessage-deflate extension is disabled, which is the default). |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
darrachequesne
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hmm, there is currently no built-in way to do that. You could listen to the
packetCreate
event:Though it might not represent the actual amount, since the payload can then be compressed down the line (it should be OK for WebSocket connections though, if the permessage-deflate extension is disabled, which is the default).