Callback if message was sent / Calculate timespan till message is sent

Apr 24, 2014 at 2:03 PM
I plan to produce some quality of service data within my SuperWebSocket service. For this I created my own AppSession (inherited from WebSocketSession).

I want to measure how long it took SuperSocket to send my binary data to the client but it seems there's no way to get feedback after some package was sent. As you know when calling Send on AppSession it gets delegated later to SocketSession.TrySend(ArraySegment<byte> which just adds this data to the internal data queue. Later the data gets sent in AsyncSocketSession.SendAsync and OnSendingComplete is called. But there's no event if one item of this queue is processed. Basically I wish to do a setup like:
byte[] data;
Stopwatch watch = new Stopwatch();
session.Send(data, 0, data.Length, d => { watch.Stop(); SaveQoS(d.Length, watch.ElapsedMilliseconds); });
Is there another way to measure how long it took SuperSocket to send a packet via the TCP socket? Of couse I don't want to loose the data queue itself, I just want feedback that my data was sent.

Best Regards
May 4, 2014 at 2:32 PM
Sorry, this kind support doesn't exist in this version of SuperSocket.