websocket-ts
websocket-ts copied to clipboard
Async version of send
I would like a way to be able to determine when my message actually gets sent or whether it gets dropped from the buffer. Would you consider adding an async version of send which returns a Promise? The promise would resolve when the message gets sent (immediately if there is an active connection), and be rejected when the message gets dropped from the buffer.
thanks for the suggestion. i think it's a great idea. let me tinker around with this for a little, i'll include it with the next release if i'm happy with the result.
hey @jjxxs did you ever get a chance to play around with this?
hi @hpx7! i didn't work on this yet but didn't forget about this either. since this has been open for a long time now and i am currently working on web-projects again i'll prioritize this since i think it's a good idea. give me another week or two please and you should see some progress. cheers!
@jjxxs just wanted to check in and see if you're still considering implementing this?
@jjxxs Hi. If I implement this behavior and create PR, can you check in merge it if it's ok?