[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-games-devel
Subject:    Re: [Kde-games-devel] KGame bug?
From:       Andreas Beckermann <b_mann () gmx ! de>
Date:       2012-04-05 15:58:47
Message-ID: 201204051758.48305.b_mann () gmx ! de
[Download RAW message or body]

On Thursday 05 April 2012, Zsur=F3 Tibor wrote:
> Hello

Hi

> I want use the 'bool connectToServer( QString, int )' function in
> KGame(KGameNetwork) class, to connect to server. If the server is not run
> or the ip address is incorrect, always return true.
> =

> In the API: "Returns: true if connected".
> =

> This is bug?
> =

> I want show error messagge, when the connection is fail.

Looking at the code, I'd say it's a lack of documentation. A comment in the =

code:

 // OK: We say that we already have connected, but this isn't so yet!
 // If the connection cannot be established, it will look as being =

disconnected
 // again ("slotConnectionLost" is called).
 // Shall we differ between these?

So it seems to me that the code merely returns true here if the connection =
was =

initiated (not established) successfully and once the host not reachable (o=
r =

whatever) message is received, the connection is considered "lost".
So KGameNetwork should emit the signalConnectionBroken() signal then.

btw: The KGame library of libkdegames is unmaintained these days, I recomme=
nd =

against using it in new games. In fact it is supposed to be moved out of =

libkdegames for that very reason, see
http://community.kde.org/KDE_Games/API_cleanup
and the recent discussion of this on this list.

> Zsur=F3 Tibor

Greetings
Andi
_______________________________________________
kde-games-devel mailing list
kde-games-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-games-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic