libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] Web Socket disconnect behaviour


From: Christian Grothoff
Subject: Re: [libmicrohttpd] Web Socket disconnect behaviour
Date: Wed, 5 Sep 2018 16:46:18 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0

On 9/3/18 6:09 PM, Paul Topley wrote:
> 
> This all works great, but there is one particular situation im not sure
> how to handle.  When there is an unexpected disconnect in the socket
> between client and server, which isnt instigated by either (lets say the
> server crashes, ethernet disconnect etc), im not sure how to
> re-establish the connection between then two.
> 
> 
> I have tried firing off another upgrade response from the server when a
> socket disconnect is detected, but the same socket int which had just
> died is passed back to my handler, which subsequently returns zero when
> I call recv to get data.
> 
> 
> Is there anything else I should be doing?
> 

You need to initiate another HTTP request from the client, again do the
upgrade and then handle resumption within your application protocol.

Happy hacking!

Christian

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]