jsonrpc_client_transports::transports::ws

Function try_connect

Source
pub fn try_connect<T>(
    url: &str,
) -> Result<impl Future<Output = Result<T, RpcError>>, RpcError>
where T: From<RpcChannel>,
Expand description

Connect to a JSON-RPC websocket server.

Uses an unbounded channel to queue outgoing rpc messages.

Returns Err if the url is invalid.