pub async fn connect<T>(
node_server: &ActorRef<NodeServerMessage>,
address: T,
) -> Result<(), ClientConnectErr>where
T: ToSocketAddrs,
Expand description
Connect to another super::NodeServer instance
node_server
- The super::NodeServer which will own this new connection sessionaddress
- The network address to send the connection to. Must implement ToSocketAddrs
Returns: [Ok(())] if the connection was successful and the super::NodeSession was started. Handshake will continue automatically. Results in a [Err(ClientConnectError)] if any part of the process failed to initiate