| 458 | private: |
| 459 | |
| 460 | bool init(Exception& ex, IPAddress::Family family) { |
| 461 | lock_guard<mutex> lock(_mutexInit); |
| 462 | if (_initialized) |
| 463 | return true; |
| 464 | if (!Net::InitializeNetwork(ex)) |
| 465 | return false; |
| 466 | _sockfd = ::socket(family == IPAddress::IPv6 ? AF_INET6 : AF_INET, type, 0); |
| 467 | if (_sockfd == NET_INVALID_SOCKET) |
| 468 | return false; |
| 469 | _initialized = true; |
| 470 | initSettings(); |
| 471 | return _initialized; |
| 472 | } |
| 473 | |
| 474 | void initSettings() { |
| 475 | Exception ex; |
nothing calls this directly
no outgoing calls
no test coverage detected