MCPcopy Create free account
hub / github.com/PerroEngine/Perro / connect_tcp

Method connect_tcp

perro_source/api_modules/perro_networking/src/world.rs:27–33  ·  view source on GitHub ↗
(&mut self, addr: A)

Source from the content-addressed store, hash-verified

25 }
26
27 pub fn connect_tcp<A: ToSocketAddrs>(&mut self, addr: A) -> NetResult<TcpConnectionId> {
28 let connection = TcpConnection::connect(addr)?;
29 Ok(TcpConnectionId(insert_slot(
30 &mut self.tcp_connections,
31 connection,
32 )))
33 }
34
35 pub fn bind_udp<A: ToSocketAddrs>(&mut self, addr: A) -> NetResult<UdpEndpointId> {
36 let endpoint = UdpEndpoint::bind(addr)?;

Callers

nothing calls this directly

Calls 2

TcpConnectionIdClass · 0.85
insert_slotFunction · 0.85

Tested by

no test coverage detected