| 94 | } |
| 95 | |
| 96 | uint16_t TCPServerImpl::getBoundPort() { |
| 97 | boost::system::error_code ec; |
| 98 | auto endpoint = _acceptor.local_endpoint(ec); |
| 99 | if (ec.failed()) { |
| 100 | return 0; |
| 101 | } |
| 102 | |
| 103 | return endpoint.port(); |
| 104 | } |
| 105 | |
| 106 | std::vector<std::string> TCPServerImpl::getAvailableAddresses() { |
| 107 | return Valdi::getAllAvailableAddresses(_ioService); |