I'm trying to send standart PONG frame to the server and use this PONG frame as a heartbeat mechanism as described in the RFC6455.
I'm succeed in sending PONG frame to the server, but I'm kind of stuck with recieveing responce from the server side.
I'm trying to do this like this:
tlsSocket.addEventListener(ProgressEvent.SOCKET_DATA, onSocketData);
private function onSocketData(event:ProgressEvent):void
{
//logic goes here
}
The thing is that onSocketData() is not called when ACK frame is recieved in responce of the PONG frame (However, at the web socket initiation this method IS called). Is there any constrains when SOCKET_DATA is fired?
Could somebody point me to my mistakes, please? Thank you!