[Kde-games-devel] setDiscoveryInfo ?

Jakub Stachowski stachowski at hypair.net
Fri Aug 19 13:42:36 CEST 2005


Dnia czwartek, 18 sierpnia 2005 23:27, Kleag napisał:
> Hello,
>
> What is the goal of the (undocumented) KGameNetwork::setDiscoveryInfo
> function introduced in kde 3.4 ?

It is used to 'announce' game on LAN so user that wants to join it does not 
need to know IP - client can discover all running ksirk servers and present 
them in combobox or something like that.
Discovery is done using DNSSD::ServiceBrowser (see kbattleship for example)

First parameter to setDiscoveryInfo is service type - it should be something 
like _ksirk._tcp (underscores and protocol name are mandatory), second 
specifies name - if you omit it hostname will be used.
Sorry for lack of documentation, i will fix it right away.

> I used it somewhat randomly, I don't 
> remember why and after a user reported a failed compilation under kde 3.3,

Something like that should be correct:

#if KDE_IS_VERSION(3,4,0)
setDiscoveryInfo("_ksirk._tcp");
#endif

> I tried no to use it and it works even better: a 5 to 10 seconds freeze
> disappear...

Could you send me strace output with timestamps?

>
> Regards,
>
> Kleag


More information about the kde-games-devel mailing list