MCPcopy Create free account
hub / github.com/ddnet/ddnet / Init

Method Init

src/engine/shared/network_console_conn.cpp:29–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29int CConsoleNetConnection::Init(NETSOCKET Socket, const NETADDR *pAddr)
30{
31 Reset();
32
33 if(net_set_non_blocking(Socket) != 0)
34 {
35 return -1;
36 }
37
38 m_Socket = Socket;
39 m_PeerAddr = *pAddr;
40 m_State = EState::ONLINE;
41 return 0;
42}
43
44void CConsoleNetConnection::Disconnect(const char *pReason)
45{

Callers

nothing calls this directly

Calls 1

net_set_non_blockingFunction · 0.85

Tested by

no test coverage detected