2.0.0 Beta 1
Pre-release
Pre-release
Initial release compatible with AMPHP v3.
As with other libraries compatible with AMPHP v3, most cases of parameters or returns of Promise<ResolutionType>
have been replaced with ResolutionType
.
- Removed the
Options
object. Settings that were set using properties on theOptions
object are now parameters to client factories in thewebsocket-client
andwebsocket-server
libraries or theHeartbeatQueue
andRateLimiter
interfaces - Added
HeartbeatQueue
andRateLimiter
interfaces with implementationsDefaultHeartbeatQueue
andDefaultRateLimiter
– these objects replace some of the functionality that was only contained withinRfc6455Client
and controlled viaOptions
Opcode
is now anenum
- Added
Websocket
as a prefix to several classes:Client
renamed toWebsocketClient
ClientMetadata
renamed toWebsocketClientMetadata
Message
renamed toWebsocketMessage
WebsocketClient
now extendsAmp\Closable
isConnected()
method replaced withisClosed()
WebsocketClient::receive()
now supports cancellation. Cancelled receives do not discard a message, a subsequent call toreceive()
will still return the next message received from the client- Closures provided to
WebsocketClient::onClose()
are provided an instance ofWebsocketClientMetadata
instead of the client object, close code, and reason. The code and reason are available on the metadata object.