I have a websocket connection that expects a JSON-RPC envelope (Holochain). To support this I need to wrap the message that is sent over the websocket in the SignalingConn class. It would be great if the class would be defined as a constructor argument so it would not be needed to override the WebrtcProvider.connect(). Alternatively the SignalingConn class could be returned by a getSignalingConnectionClass() hook that can be overrided more easily.
|
const signalingConn = map.setIfUndefined(signalingConns, url, () => new SignalingConn(url)) |
I have a websocket connection that expects a JSON-RPC envelope (Holochain). To support this I need to wrap the
messagethat is sent over the websocket in the SignalingConn class. It would be great if the class would be defined as a constructor argument so it would not be needed to override theWebrtcProvider.connect(). Alternatively the SignalingConn class could be returned by agetSignalingConnectionClass()hook that can be overrided more easily.y-webrtc/src/y-webrtc.js
Line 595 in 5fffe6b