How to get server to client transferred bytes?

I am currently using IHTTPStreamerSession.getIOPerformanceCounter().getMessagesOutBytes() for HTTP streaming. But I am not sure if this is ok.

Hello there,

You can use IOPerformanceCounter in the IMediaStreamActionNotify.onStop() handler:

public void onStop(IMediaStream stream)
{
	IOPerformanceCounter perf = stream.getMediaIOPerformance();
	getLogger().info("Total OutBytes: " + perf.getMessagesOutBytes());
}

But the best way is look at log files. Look at the sc-bytes (server to client bytes) in rows with x-event “destroy”

I hope this helps.

Salvadore

Hey Salvadore,

Thanks for the answer.

The problem is that it is part of a custom module that logs how many bytes were transferred in the last 10 seconds.

It is HTTP connection so I don’t think IMediaStream will work.

Also I have a watchdog that runs every 10 seconds. Not just onStop.