Bekiares Tyrone-CTB041 Tyrone.Bekiares at motorolasolutions.com
Sat Aug 9 22:54:57 CEST 2014


I'm working with LWS 1.3 using VS2013. When I run under Win7 in non-SSL mode, I get the following error in Chrome (v36) when I try to load large files (GET net::ERR_CONTENT_LENGTH_MISMATCH). The .js file in question is 443kb. 

I'm serving them the "easy" way using libwebsockets_serve_http_file().

I don't get any error when loading these files using FireFox.

I don't get any error when loading these files with the same version of Chrome, but with LWS 1.23.

Any ideas?


-----Original Message-----
From: Andy Green [mailto:extracats at googlemail.com] On Behalf Of Andy Green
Sent: Saturday, August 09, 2014 5:51 AM
To: bjorka adinov; libwebsockets at warmcat.com
Subject: Re: [Libwebsockets] Callback when timeout during connection establishment ?

On 9 August 2014 18:30:43 GMT+08:00, bjorka adinov <adinov.bjorka at gmail.com> wrote:
>Hello Sir,
>As far as I know there is no callback when connection timeouts during 
>connection establishment. Is there a way to detect that a connection is 
>timeout ?

Lws should cover all the stages of the connection, both as client trying to make the connection and server trying to process it, with an lws timeout.

If one of these times out, the socket will be closed.

Because no websocket upgrade was completed, there won't be a normal close callback.

You might get a LWS_CALLBACK_CLOSED_HTTP depending on when the connection failed.

Otherwise the connection will just be closed without the user callback getting informed.

Do you have a case where the user code needs to know about failed connection attempts?


>Thank you, much appreciated
>Libwebsockets mailing list
>Libwebsockets at ml.libwebsockets.org

Libwebsockets mailing list
Libwebsockets at ml.libwebsockets.org

More information about the Libwebsockets mailing list