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
feat(ws): add methods taking in a tungstenite config (gakonst#2373)
* feat(ws): add methods taking in a tungstenite config
Signed-off-by: Francesco <[email protected]>
* fix(ws): change args order in connect_with_config
Signed-off-by: Francesco <[email protected]>
* fix(ws): use config in reconnect if present
Signed-off-by: Francesco <[email protected]>
* fix(ws): fix wasm build
Signed-off-by: Francesco <[email protected]>
* fix(ws): make code more dry
Signed-off-by: Francesco <[email protected]>
---------
Signed-off-by: Francesco <[email protected]>
Copy file name to clipboardexpand all lines: ethers-providers/src/rpc/transports/ws/mod.rs
+30
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,36 @@ impl WsClient {
50
50
Ok(this)
51
51
}
52
52
53
+
#[cfg(not(target_arch = "wasm32"))]
54
+
/// Establishes a new websocket connection. This method allows specifying a custom websocket
55
+
/// configuration, see the [tungstenite docs](https://docs.rs/tungstenite/latest/tungstenite/protocol/struct.WebSocketConfig.html) for all avaible options.
/// Establishes a new websocket connection with auto-reconnects. This method allows specifying a
67
+
/// custom websocket configuration, see the [tungstenite docs](https://docs.rs/tungstenite/latest/tungstenite/protocol/struct.WebSocketConfig.html) for all avaible options.
0 commit comments