[Libwebsockets] client issue?

Joel Winarske joel.winarske at gmail.com
Thu Feb 9 02:12:23 CET 2017


Operator error.  It works great now.

I just needed to implement LWS_CALLBACK_RECEIVE_CLIENT_HTTP_READ to handle
the chunks.

On Wed, Feb 8, 2017 at 12:40 PM, Joel Winarske <joel.winarske at gmail.com>
wrote:

> I added a printout of the return value from lws_ssl_capable_read()
> in lws_http_client_read, and it reports what looks like a sane value.
>
>
> On Wed, Feb 8, 2017 at 11:38 AM, Joel Winarske <joel.winarske at gmail.com>
> wrote:
>
>> In the below scenario I was figuring I should see nine different
>> LWS_CALLBACK_RECEIVE_CLIENT_HTTP callbacks, as well as valid read
>> lengths.  Am I missing something?
>>
>> $ ./libwebsockets-test-client http://inrix.com
>> ...
>> [2017/02/08 08:58:26:9465] NOTICE: http: connecting
>> [2017/02/08 08:58:26:9575] NOTICE: dumb: LWS_CALLBACK_CLIENT_APPEND_HAN
>> DSHAKE_HEADER
>> [2017/02/08 08:58:26:9662] NOTICE: dumb: LWS_CALLBACK_ESTABLISHED_CLIENT_HTTP
>> 200
>> [2017/02/08 08:58:26:9663] NOTICE: lws_client_interpret_server_handshake:
>> client connection up
>> [2017/02/08 08:58:26:9663] NOTICE: dumb: LWS_CALLBACK_RECEIVE_CLIENT_HTTP
>> [2017/02/08 08:58:26:9663] NOTICE: lws_http_client_read len=0
>> [2017/02/08 08:58:26:9681] NOTICE: dumb: LWS_CALLBACK_RECEIVE_CLIENT_HTTP
>> [2017/02/08 08:58:26:9682] NOTICE: lws_http_client_read len=0
>> [2017/02/08 08:58:26:9701] NOTICE: dumb: LWS_CALLBACK_RECEIVE_CLIENT_HTTP
>> [2017/02/08 08:58:26:9701] NOTICE: lws_http_client_read len=0
>> [2017/02/08 08:58:26:9720] NOTICE: dumb: LWS_CALLBACK_RECEIVE_CLIENT_HTTP
>> [2017/02/08 08:58:26:9721] NOTICE: lws_http_client_read len=0
>> [2017/02/08 08:58:26:9738] NOTICE: dumb: LWS_CALLBACK_RECEIVE_CLIENT_HTTP
>> [2017/02/08 08:58:26:9739] NOTICE: dumb: LWS_CALLBACK_COMPLETED_CLIENT_
>> HTTP
>> [2017/02/08 08:58:26:9739] NOTICE: lws_http_client_read len=3
>>
>>
>> [2017/02/08 08:58:26:9739] ERR: Exiting
>> [2017/02/08 08:58:26:9739] NOTICE: lws_context_destroy: ctx 0x1d01990
>> [2017/02/08 08:58:26:9739] NOTICE: lws_context_destroy2: ctx 0x1d01990
>>
>>
>> In wireshark for the above I saw eight TCP packets with the following
>> lengths - 4104, 2736, 2736, 2736, 5472, 1368, 4104, 1851.
>>
>>
>> Joel
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20170208/e2706723/attachment-0002.html>


More information about the Libwebsockets mailing list