[Libwebsockets] WS PING/PONG

Joel Winarske joel.winarske at gmail.com
Wed Apr 19 02:30:22 CEST 2017


Cool thanks!

On Tue, Apr 18, 2017 at 5:10 PM, Andy Green <andy at warmcat.com> wrote:

>
>
> On 04/19/2017 03:27 AM, Joel Winarske wrote:
>
>> Hi Andy,
>>
>> I'm seeing something odd with PONG responses.  It would seem the issue is
>> on the browser side, but I wanted to run it by you.  Up until I receive a
>> PONG, the WS endpoint happily sends me JSON.  The next packet on the WS
>> endpoint post PONG is no longer JSON string.  I haven't caught this yet in
>> Wireshark to confirm the PING/PONG opcodes.  Is it safe to say this is
>> solely browser side?
>>
>
> No, I dunno what it is.  The PONG should not turn up at the
> CALLBACK_RECEIVE callback if that is what happened.  However I am pretty
> sure this works generally and I can't think of anything windows-specific
> about it.  You'll have to dump it in hex or tcpdump / wireshark to get a
> clue what it is.
>
> -Andy
>
>
>> Thanks,
>> Joel
>>
>> lwsws[3745]: activation: (0x738ad0) LWS_CALLBACK_RECEIVE
>> len = 128
>> {"request":{"method":"ReportActivationStatus","reqID":"33","
>> parameters":{"platformActivated":true,"foregroundAppTitle":"Home"}}}
>> lwsws[3745]: activate: LWS_CALLBACK_SERVER_WRITEABLE
>> lwsws[3745]: activate: LWS_CALLBACK_SERVER_WRITEABLE
>> lwsws[3745]: activate: LWS_CALLBACK_RECEIVE_PONG
>> lwsws[3745]: activate: LWS_CALLBACK_SERVER_WRITEABLE
>> lwsws[3745]: activate: LWS_CALLBACK_RECEIVE_PONG
>> lwsws[3745]: activation: (0x738ad0) LWS_CALLBACK_RECEIVE
>> len = 12
>> "�~j4�
>> lwsws[3745]: activation: JSON PARSE ERROR "unexpected end of data"
>> lwsws[3745]: activation: (0x738ad0) LWS_CALLBACK_RECEIVE
>> len = 14
>> "�nJ
>>     $��
>>
>>
>>
>> _______________________________________________
>> Libwebsockets mailing list
>> Libwebsockets at ml.libwebsockets.org
>> https://libwebsockets.org/mailman/listinfo/libwebsockets
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20170418/03c0f29e/attachment-0002.html>


More information about the Libwebsockets mailing list