Skip to content

2.0.0

Latest
Compare
Choose a tag to compare
@trowski trowski released this 28 Dec 22:25
· 1 commit to 2.x since this release
v2.0.0
87a5d32

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 now WebsocketConnection.
  • Advanced handshake and connection parameters may be specified using a Rfc6455ConnectionFactory instance provided when constructing a Rfc6455Connector.
  • A global WebsocketConnector instance may be accessed and set via Amp\Websocket\Client\websocketConnector().