Function ractor_cluster::node::client::connect_enc
source · pub async fn connect_enc<T>(
node_server: &ActorRef<NodeServerMessage>,
address: T,
encryption_settings: TlsConnector,
domain: ServerName<'static>
) -> Result<(), ClientConnectErr>where
T: ToSocketAddrs,
Expand description
Connect to another super::NodeServer instance with network encryption
node_server
- The super::NodeServer which will own this new connection sessionaddress
- The network address to send the connection to. Must implement ToSocketAddrsencryption_settings
- The tokio_rustls::TlsConnector which is configured to encrypt the socketdomain
- The server name we’re connecting to (ServerName)
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