Allows opening channel with the same name while if others are closing (synchronously).
Added Client.getConnectionMetadata() This change adds a way of obtaining the connection metadata for the WebSocket. This allows obtaining the connection's token, among other things.
Allow passing a thunk (function) to the service
property of openChannel
this function expects a string returned for the service name. The function is passed the context.
Default url changed to the global cluster, eval.repl.it
is no longer supported by the backend.
For tests and debug mode new environment variables are needed. See README
Added long polling support. If the websocket connection fails 3 times in a row we now fallback to using polling using Engine-io and a proxy that talks to the backend.
The client has been reworked to handle reconnection internally. The API is drastically different but the general concepts are the same. Please refer to updated docs for usage information.
Client close event now emits CloseResult
Channel closing during channel.request
no longer throws an error. It now returns an extended @replit/protocol::Command
that includes a channelClosed
Added a specific error (Channel.ChannelCloseError) to assert on when checking channel closing.
Make stack traces for Channel.request
more usable.
Increment listener limit for the control channel (channel 0) when requesting a channel open.
This is only a breaking change for debugging and stats collection (pings)
See replit#15
- Debug pings are not started automatically
- You can now call
client.startPing
after you connect to maintain old behavior :)
See replit#12
- Reset the the handshake/connection
timeout
if we get a message on the socket instead of waiting for{ containerState: READY }
- [internal] Refactor to simplify code and fit this in easily.