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

Method checkLookup

Engine/source/platform/platformNetAsync.cpp:139–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137}
138
139bool NetAsync::checkLookup(NetSocket socket, void* out_h_addr,
140 S32* out_h_length, S32 out_h_addr_size)
141{
142 bool found = false;
143
144 // search for the socket
145 RequestIterator iter;
146 for (iter = mLookupRequests.begin();
147 iter != mLookupRequests.end();
148 ++iter)
149 // if we found it and it is complete...
150 if (socket == iter->sock && iter->complete)
151 {
152 // copy the lookup data to the callers parameters
153 dMemcpy(out_h_addr, iter->out_h_addr, out_h_addr_size);
154 *out_h_length = iter->out_h_length;
155 found = true;
156 break;
157 }
158
159 // we found the socket, so we are done with it. erase.
160 if (found)
161 mLookupRequests.erase(iter);
162
163 return found;
164}

Callers 1

processMethod · 0.80

Calls 4

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

Tested by

no test coverage detected