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
Optionsobject. Settings that were set using properties on theOptionsobject are now parameters to client factories in thewebsocket-clientandwebsocket-serverlibraries or theHeartbeatQueueandRateLimiterinterfaces - Added
HeartbeatQueueandRateLimiterinterfaces with implementationsDefaultHeartbeatQueueandDefaultRateLimiter– these objects replace some of the functionality that was only contained withinRfc6455Clientand controlled viaOptions Opcodeis now anenum- Added
Websocketas a prefix to several classes:Clientrenamed toWebsocketClientClientMetadatarenamed toWebsocketClientMetadataMessagerenamed toWebsocketMessage
WebsocketClientnow extendsAmp\ClosableisConnected()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 ofWebsocketClientMetadatainstead of the client object, close code, and reason. The code and reason are available on the metadata object.