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

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