MCPcopy Create free account
hub / github.com/defold/defold / FindSlot

Function FindSlot

engine/dlib/src/dlib/connection_pool.cpp:239–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

237 }
238
239 static bool FindSlot(HPool pool, uint32_t* index, Connection** connection)
240 {
241 uint32_t n = pool->m_Connections.Size();
242
243 for (uint32_t i = 0; i < n; ++i) {
244 Connection* c = &pool->m_Connections[i];
245 if (c->m_State == STATE_FREE) {
246 *connection = c;
247 *index = i;
248 return true;
249 }
250 }
251 return false;
252 }
253
254 static bool PublishInProgressSocket(HPool pool, Connection* connection, dmSocket::Socket* socket)
255 {

Callers 1

DoDialFunction · 0.85

Calls 1

SizeMethod · 0.45

Tested by

no test coverage detected