Closed Gabiras12 closed 4 years ago
Hey,
Thank you for the suggestion but a priority for sockette is size. The only conveniences it seeks to offer are 1) reconnecting 2) JSON messages since that's a 90% use case. Everything else, including this request, is easily achievable in application code with little effort (as you've described).
I'm sorry but I won't be including this. I hope you understand.
Thanks again 🙇♂️
new Sockette returns a promise that is resolved once the connection in open and rejected on error.
With this is possible to await the connection and send message already. I know we have the onopen callback. this is just syntax sugar.
this would fix this issue: https://github.com/lukeed/sockette/issues/47