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

Function getServerPeer

engine/Poseidon/Network/NetTransportNet.cpp:156–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154 if (clientPeer)
155 {
156 NetChannel* ctrl = clientPeer->getBroadcastChannel();
157 if (ctrl)
158 {
159 ctrl->setProcessRoutine(enumReceive);
160 }
161 }
162 }
163 return clientPeer;
164}
165
166static NetPeer* getServerPeer()
167// should be called inside of poolLock.enter()
168{
169 if (!serverPeer)
170 {
171 BitMask portMask;
172 setupPortBitMask(portMask, true);
173 serverPeer = getPool()->createPeer(&portMask);
174 if (serverPeer)
175 {
176 NetChannel* ctrl = serverPeer->getBroadcastChannel();
177 if (ctrl)

Callers 11

setServerFunction · 0.85
serverReceiveFunction · 0.85
ctrlReceiveFunction · 0.85
NetServerMethod · 0.85
~NetServerMethod · 0.85
InitMethod · 0.85
SendMsgMethod · 0.85
CancelAllMessagesMethod · 0.85
GetURLMethod · 0.85
ProcessUserMessagesMethod · 0.85
ProcessSendCompleteMethod · 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