[Qt-interest] Qt C/S Model , howto detect each other ?
Arnold Krille
arnold at arnoldarts.de
Wed Apr 14 08:29:27 CEST 2010
Hi,
On Wednesday 14 April 2010 07:30:22 Aaron Lewis wrote:
> Which means once you setup an server , you are also the clients , but
> you've got some privileges ;-)
> For Clients , How do i get to know if there's a serer on the same
> network range ?
> So far i've got 2 ways , which i thought's not so good.
> I) Scan for ports .. bad on speed performances
> II) Send BroadCasts , any machine who can parse our packet is my friends
> Any other good ways ?
Take a look at upnp and bonjour aka avahi aka zeroconf. These are two of the
biggest zero-configuration protocols.
I use zeroconf in some of my projects and its just nice to have clients find
the (local) servers without any trouble or manual configuration... I tried
using the avahi-libs for the implementation but then I realized that I wanted
it to run on macos and possibly win too, so using the QtBonjour-example from
some Qt-quarterly was better...
Of course that only works in local networks, to access remote systems you have
to enter names or ip-addresses by hand or get a list of servers from a public
server with http or something.
Have fun,
Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100414/6390cdc9/attachment.bin
More information about the Qt-interest-old
mailing list