0

In my Qt application I am using a peer to peer DBus connection. Server runs on computer A, client on B, connected via DBus TCP/IP connection. Works fine.

I wonder if I can somehow find out whether the server is running and what its IP address is? So far I need to provide the correct address/port in the client.

Both, server and client run in a local network. Of course, I can use a trial and error approach and ping all machines in my network. Is there something better, something like a broadcast asking for the server, and the server responding appropriately? Is Qt providing something for this?

Praetorian
  • 106,671
  • 19
  • 240
  • 328
Horst Walter
  • 13,663
  • 32
  • 126
  • 228
  • 1
    You are probably interested in service discovery protocols. Qt doesn't have any built-in though they are easily implementable using Qt. Check out [QtZeroConf](https://github.com/johanneshilden/qtzeroconf). There was a [Qt Quarterly article about service discovery](http://doc.qt.digia.com/qq/qq23-bonjour.html) awhile back too. – Linville Jun 10 '14 at 12:20
  • Excellent stuff, if you like you can copy it over as an answer (so I can give you decent credits). I am not yet sure whether I'll eventually mark it as final answer, but for sure I upvote it. – Horst Walter Jun 10 '14 at 16:38

0 Answers0