MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / checkLookup

Method checkLookup

Engine/source/platform/platformNetAsync.cpp:165–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163}
164
165bool NetAsync::checkLookup(NetSocket socket, void* out_h_addr,
166 S32* out_h_length, S32 out_h_addr_size)
167{
168 bool found = false;
169
170 // search for the socket
171 RequestIterator iter;
172 for (iter = mLookupRequests.begin();
173 iter != mLookupRequests.end();
174 ++iter)
175 // if we found it and it is complete...
176 if (socket == iter->sock && iter->complete)
177 {
178 // copy the lookup data to the callers parameters
179 dMemcpy(out_h_addr, iter->out_h_addr, out_h_addr_size);
180 *out_h_length = iter->out_h_length;
181 found = true;
182 break;
183 }
184
185 // we found the socket, so we are done with it. erase.
186 if (found)
187 mLookupRequests.erase(iter);
188
189 return found;
190}

Callers 2

processMethod · 0.80
processMethod · 0.80

Calls 4

dMemcpyFunction · 0.50
beginMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected