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

Method managed

MonaBase/sources/Socket.cpp:445–455  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

443
444
445 bool managed(Exception& ex) {
446 ASSERT_RETURN(_initialized, false);
447 lock_guard<recursive_mutex> lock(_mutexManaged);
448 if (_pManagedSocket)
449 return true;
450 ASSERT_RETURN(_pSocket!=NULL,false)
451 ioctl(ex,FIONBIO, 1); // set non blocking mode (usefull for posix)
452 if (ex)
453 return false;
454 return (_pManagedSocket=manager.add(ex,_sockfd, *_pSocket))!=NULL;
455 }
456
457
458private:

Callers 1

onSubscribeMethod · 0.80

Calls 1

addMethod · 0.45

Tested by

no test coverage detected