MCPcopy Create free account
hub / github.com/MonaSolutions/MonaServer / addSender

Method addSender

MonaBase/sources/Socket.cpp:408–417  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

406 }
407
408 bool addSender(Exception& ex,const shared_ptr<SocketSender>& pSender) {
409 lock_guard<recursive_mutex> lock(_mutexManaged);
410 if (!managed(ex)) // check init already, so _sockfd is good!
411 return false;
412 lock_guard<mutex> lockAsync(_mutexAsync);
413 _senders.emplace_back(pSender);
414 if (!_writing)
415 _writing = manager.startWrite(_sockfd,_pManagedSocket);
416 return _writing;
417 }
418
419
420 // Is called from one other thread than main thread (by the manager socket thread, so here socket is necessary managed, and _sockfd is good)

Callers

nothing calls this directly

Calls 1

startWriteMethod · 0.80

Tested by

no test coverage detected