MCPcopy Create free account
hub / github.com/SmingHub/Sming / add

Method add

Sming/Arch/Host/Components/hostlib/sockets.cpp:332–348  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

330}
331
332void CSocketList::add(CSocket* skt)
333{
334 lock();
335 for(auto& s : *this) {
336 if(!s->active()) {
337 delete s;
338 s = skt;
339 skt = nullptr;
340 break;
341 }
342 }
343
344 if(skt != nullptr) {
345 push_back(skt);
346 }
347 unlock();
348}
349
350void CSocketList::send(const void* data, size_t n, int flags)
351{

Callers 1

try_connectMethod · 0.45

Calls 1

activeMethod · 0.45

Tested by

no test coverage detected