| 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 | |
| 458 | private: |