pub fn new_memory_sockets(
client_ids: Vec<u16>,
encrypted: bool,
reliable: bool,
) -> (MemorySocketServer, Vec<MemorySocketClient>)Expand description
Generates in-memory sockets.
Set the encrypted parameter to true if you want to pretend that channels are encrypted. If true, then
netcode won’t encrypt packets.
Set the reliable to true if you want to downgrade all channels to unreliable.
If you don’t want to downgrade channels (e.g. for performance testing), set it to false.
Returns (server socket, client sockets). Client addresses are derived from client ids.
Note that duplicate client ids will be removed.
§Panics
Panics if any client id equals u16::MAX.