| 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 | { |