| 321 | } |
| 322 | |
| 323 | void Server::broadcast() |
| 324 | { |
| 325 | if (!Server::instance()->isListening()) |
| 326 | return; |
| 327 | |
| 328 | QByteArray datagram; |
| 329 | QDataStream stream(&datagram, QIODevice::WriteOnly); |
| 330 | stream << Protocol::broadcastFormatVersion(); |
| 331 | stream << Protocol::version(); |
| 332 | stream << externalAddress(); |
| 333 | stream << label(); // TODO integrate hostname |
| 334 | m_serverDevice->broadcast(datagram); |
| 335 | } |
| 336 | |
| 337 | QUrl Server::externalAddress() const |
| 338 | { |
nothing calls this directly
no test coverage detected