[Libwebsockets] Acknowledgement on lws_write / LWS_WRITE_BINARY?
Duane.Butler at calix.com
Sat Sep 12 18:34:59 CEST 2020
Thanks Andy, that’s kind of what I thought, but wanted to check.
Sent from my iPhone
> On Sep 12, 2020, at 10:53 AM, Andy Green <andy at warmcat.com> wrote:
> [External Email]
>> On 9/12/20 4:48 PM, Duane Butler wrote:
>> We’re using libwebsockets 4.0 stable.
>> We are seeing cases where client LWS_WRITE_BINARY messages are not being
>> delivered due to unstable network connections and websocket closures in
>> the middle of pending writes.
>> Is there a way for a client application to know if a message was
>> actually delivered to the other side or not?
> ws itself doesn't offer the concept of "transactions" in the same way
> as, eg, http does, with a "request" and then a "response" with an
> explicit code saying the disposition of the request.
> If you want that, you have to add it into your ws subprotocol, eg, every
> outgoing ws message with your subprotocol has an incrementing ordinal or
> random token, and the peer will report back with an explicit disposition
> message listing which ones it saw and what the disposition was.
More information about the Libwebsockets