Function zebra_network::connect_isolated[][src]

pub fn connect_isolated(
    conn: TcpStream,
    user_agent: String
) -> impl Future<Output = Result<BoxService<Request, Response, Box<dyn Error + Send + Sync + 'static>>, Box<dyn Error + Send + Sync + 'static>>>

Use the provided TCP connection to create a Zcash connection completely isolated from all other node state.

The connection pool returned by init should be used for all requests that don’t require isolated state or use of an existing TCP connection. However, this low-level API is useful for custom network crawlers or Tor connections.

In addition to being completely isolated from all other node state, this method also aims to be minimally distinguishable from other clients.

Note that this method does not implement any timeout behavior, so callers may want to layer it with a timeout as appropriate for their application.



connect_isolated only works on Mainnet, see #1687.