pub async fn start<M: MessageTypes>(
tcp_socket_addr: SocketAddr,
udp_socket_addr: SocketAddr,
config: Config,
) -> Result<(ActorHandle<M>, UnboundedReceiver<Event<M>>), StartServerError>
Expand description
Start server.
This returns a handle to the server actor task and an event stream. The ActorHandle is used to command the server. The event stream receiver is used to listen to server events.
The actor handles can be freely cloned. When the last handle to the server actor is dropped, or the receiver is closed or dropped, the server task will begin graceful shut down.