rpc-websockets icon indicating copy to clipboard operation
rpc-websockets copied to clipboard

No Protocols Passed to `window.WebSocket`

Open abdalrahmanSrour opened this issue 5 years ago • 5 comments

Hello and thanks for this great JSON-RPC 2.0 implementation

Anyway i was looking around your implementation and found that in Client APIs the "protocols" is not being passed to "window.WebSocket". Here at line 26 https://github.com/elpheria/rpc-websockets/blob/ea4a76be20738208b36a29bc38876aac407ed4b7/src/lib/client/websocket.browser.ts#L22-L27

because protocols is always no passed from here at line 93 https://github.com/elpheria/rpc-websockets/blob/ea4a76be20738208b36a29bc38876aac407ed4b7/src/lib/client/websocket.browser.ts#L91-L94

I think we can add the protocols as new argument.

abdalrahmanSrour avatar Mar 10 '20 05:03 abdalrahmanSrour

Thanks, @abdalrahmanSrour, sounds good. Please provide a PR including tests and I’ll be more than happy to take a look and include it!

mkozjak avatar Mar 10 '20 09:03 mkozjak

Any updates on this one, @abdalrahmanSrour?

mkozjak avatar Aug 05 '20 13:08 mkozjak

@abdalrahmanSrour - ping!

mkozjak avatar Aug 26 '20 08:08 mkozjak

Pong!

Sorry for not replying, actually i moved to implement new WS client. Anyway if i had sometime soon i will try to do it.

abdalrahmanSrour avatar Aug 26 '20 08:08 abdalrahmanSrour

@abdalrahmanSrour: Using another lib? Which one?

mkozjak avatar Aug 26 '20 08:08 mkozjak