MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / getClientPeer

Function getClientPeer

engine/Poseidon/Network/NetTransportNet.cpp:136–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134 mask.on(port);
135 }
136 else
137 {
138 for (i = 0; i++ < NUM_PORTS_TO_TRY; port += PORT_INTERVAL)
139 {
140 mask.on(port);
141 }
142 }
143}
144
145static NetPeer* getClientPeer()
146// should be called inside of poolLock.enter()
147{
148 if (!clientPeer)
149 {
150 BitMask portMask;
151 setupPortBitMask(portMask, false);
152 clientPeer = getPool()->createPeer(&portMask);
153 if (clientPeer)
154 {
155 NetChannel* ctrl = clientPeer->getBroadcastChannel();
156 if (ctrl)
157 {

Callers 11

NetSessionEnumMethod · 0.85
~NetSessionEnumMethod · 0.85
InitMethod · 0.85
StartEnumHostsMethod · 0.85
StopEnumHostsMethod · 0.85
NSessionsMethod · 0.85
setEnumFunction · 0.85
setClientFunction · 0.85
enumReceiveFunction · 0.85
NetClientMethod · 0.85
InitMethod · 0.85

Calls 5

setupPortBitMaskFunction · 0.85
getPoolFunction · 0.85
setProcessRoutineMethod · 0.80
createPeerMethod · 0.45
getBroadcastChannelMethod · 0.45

Tested by

no test coverage detected