Function mpstthree::transport::tcp::fork::fork_tcp [−][src]
pub fn fork_tcp<S, P>(
p: P,
address: &str
) -> Result<(JoinHandle<()>, S::Dual, TcpStream), Box<dyn Error>> where
S: Session + 'static,
P: FnOnce(S, TcpStream) -> Result<(), Box<dyn Error>> + Send + 'static,
This is supported on crate features
transport
or transport_tcp
only.Expand description
Creates a child process, and a session with two dual
endpoints of type S
and S::Dual
. The first endpoint
is given to the child process. Returns the
second endpoint.
This function is available only if MultiCrusty is built with
the "transport"
feature or the "transport_tcp"
feature.