The Phoenix socket has a sendBuffer where sends can be queued prior to a connection made. Once the connection is made the buffer is flushed sending each in their original order: https://github.com/phoenixframework/phoenix/blob/main/assets/js/phoenix/socket.js#L629-L634
Would be great to have a similar functionality in this lib