[Kde-games-devel] Re: Discovery of LAN servers for kbattleship

Jakub Stachowski stachowski at hypair.net
Wed Dec 15 20:08:43 CET 2004


A Dilluns 13 Desembre 2004 16:12, Jakub Stachowski va escriure:
>> Hello,
>>
>> Attached patch allows kbattleship to announce game server on LAN. Client is
>> able to discover active servers so user doesn't have to know ip and port.
>> kdnssd library (from kdelibs) is used for that.
>> The same could be done for lskat, kwin4 and possibly atlantik.
>> Comments? Suggestions?

>I've not compiled the patch so i'm speaking only having read it.

>A question: Is building kdnssd in kdelibs obligatory, i mean, if it is 
>optional, kbattleship will not build on people with kdnssd compiled, no?

No, kdnssd is always built. If someone does not have working DNS-SD setup 
simply no servers will be found.

>A suggestion, i see in kclientdialog.h you have defined BATTLESHIP_SERVICE, 
>but in kbattleshipserver.cpp you use the literal "_kbattleship._tcp", could 
>you use the same define in both places?

>Also #define is usually not used in kde, it is prefered to use 
>static const char* BATTLESHIP_SERVICE = "_kbattleship._tcp";

Corrected. Now it looks ok to commit?

Regarding other games I mentioned: it looks like libkdegames needs to be 
changed, not individual apps. I will submit patch in next few days.



>Albert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kbattleship.patch.gz
Type: application/x-gzip
Size: 5037 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-games-devel/attachments/20041215/e74d49a2/kbattleship.patch.gz


More information about the kde-games-devel mailing list