You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(transport): Consolidate transport interface (#1002)
* feat(transport): Initial P2P transport implementation
* docs(examples): Add P2P transport example
* docs(examples): Fix lack of viewport tag on HTML template
* docs(examples): P2P example tweaks
* refactor(transport): Move shared transport logic to base class
* test(transport): Test callback initialisation in base class
* feat(transport): Allow configuration of `Peer`
Pass options object to P2P transport to use when instantiating the `Peer` connection.
* refactor(transport): Centralise update handling in the client
Previously, different transport implementations received a reference to the client’s Redux store and duplicated logic to map update data from the master to an action which they dispatched to the store. This centralises this in the client, keeping the store a client-only concept and exposing a single callback to transport implementations that expects to receive the same `TransportData` emitted by the master. In this way, transports should be “thinner”, focusing on implementing the glue between a client and a master.
* test: Update tests for new transport interface
* refactor(transport): Rename transport methods for clarity
- `onAction` → `sendAction`
- `onChatMessage` → `sendChatMessage`
* refactor(transport): Move `isConnected` initialisation to base class
* refactor(transport): Move responsibility for calling connection callback to base class
* refactor(transport): Rename method for clarity
Rename internal `callback` property to `connectionStatusCallback` to better describe purpose.
* docs(transport): Move method comments to base class
* revert: Remove P2P transport
* refactor(transport): Rename method to `subscribeToConnectionStatus`
* build: Export base `Transport` class in internal package
* refactor(client): Rename private class method
* refactor(client): Insulate client callback in `Transport`
* docs(master): Add comments to clarify types
* fix(types): Include `isConnected` in match metadata interface
* style: Be consistent about specifying return types
0 commit comments