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
signature.asc
Description: OpenPGP digital signature