Result sending data OK even the client was not connected
Hello, thank you for this very good library. But I have an issue. I have server and several clients. A client is connected. After a minute I disconnect the client by turning off power supply (so the client cannot send close). Now I send a data from server to the client which was disconnected. But I the result of the sending data is OK. But it could not been sent because physically the client is not connected anymore. How to please fix it? Thank you in advance.
You can't really trust the websocket 'send' return value, it just tells you if there were some big errors, but the packets could be lost while bouncing around, hoping from one distant network switch to another.
To be really sure you need to send back ack. There are a lot of chat protocols that implement this (jabber is one).