<div>Hello<br></div><div><br></div><div>Thank you, I will rewrite my game to QTcpServer/QTcpSocket. </div><div><br></div><div>Zsuró Tibor</div><div><br></div><div class="gmail_quote">2012/4/5 Andreas Beckermann <span dir="ltr"><<a href="mailto:b_mann@gmx.de" target="_blank">b_mann@gmx.de</a>></span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thursday 05 April 2012, Zsuró Tibor wrote:<br>
> Hello<br>
<br>
Hi<br>
<div><div><br>
> I want use the 'bool connectToServer( QString, int )' function in<br>
> KGame(KGameNetwork) class, to connect to server. If the server is not run<br>
> or the ip address is incorrect, always return true.<br>
><br>
> In the API: "Returns: true if connected".<br>
><br>
> This is bug?<br>
><br>
> I want show error messagge, when the connection is fail.<br>
<br>
</div></div>Looking at the code, I'd say it's a lack of documentation. A comment in the<br>
code:<br>
<br>
 // OK: We say that we already have connected, but this isn't so yet!<br>
 // If the connection cannot be established, it will look as being<br>
disconnected<br>
 // again ("slotConnectionLost" is called).<br>
 // Shall we differ between these?<br>
<br>
So it seems to me that the code merely returns true here if the connection was<br>
initiated (not established) successfully and once the host not reachable (or<br>
whatever) message is received, the connection is considered "lost".<br>
So KGameNetwork should emit the signalConnectionBroken() signal then.<br>
<br>
btw: The KGame library of libkdegames is unmaintained these days, I recommend<br>
against using it in new games. In fact it is supposed to be moved out of<br>
libkdegames for that very reason, see<br>
<a href="http://community.kde.org/KDE_Games/API_cleanup" target="_blank">http://community.kde.org/KDE_Games/API_cleanup</a><br>
and the recent discussion of this on this list.<br>
<br>
> Zsuró Tibor<br>
<br>
Greetings<br>
Andi<br>
_______________________________________________<br>
kde-games-devel mailing list<br>
<a href="mailto:kde-games-devel@kde.org" target="_blank">kde-games-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kde-games-devel" target="_blank">https://mail.kde.org/mailman/listinfo/kde-games-devel</a><br>
</blockquote></div><br>