Stable release compatible with AMPHP v3 and fibers! 🎉
As with other libraries compatible with AMPHP v3, most cases of parameters or returns of Promise<ResolutionType>
have been replaced with ResolutionType
.
This release is compatible with amphp/http-client@^5
and amphp/websocket@^2
. See the release notes of these libraries for further change notes.
Similar to v1
, a Websocket connection is created using Amp\Websocket\Client\connect()
or using an instance of WebsocketConnector
, calling WebsocketConnector::connect()
. The returned WebsocketConnection
then is used to send and receive WebSocket messages.
- Renamed most classes and interfaces to add
Websocket
as a prefix to avoid name collisions with similarly named classes in other packages which are frequently used together. For example,Connection
is nowWebsocketConnection
. - Advanced handshake and connection parameters may be specified using a
Rfc6455ConnectionFactory
instance provided when constructing aRfc6455Connector
. - A global
WebsocketConnector
instance may be accessed and set viaAmp\Websocket\Client\websocketConnector()
.