| 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) |
nothing calls this directly
no test coverage detected