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

List:       kde-games-devel
Subject:    Re: [Kde-games-devel] KGame bug?
From:       Zsuró_Tibor <zsurotibor () gmail ! com>
Date:       2012-04-09 8:38:07
Message-ID: CAJOqQF6ZM=XVAbFRpqBBqRdC=5mVpQm=qDwqZ8TJN1W3V0Fe=w () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hello

Thank you, I will rewrite my game to QTcpServer/QTcpSocket.

Zsur=F3 Tibor

2012/4/5 Andreas Beckermann <b_mann@gmx.de>

> 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 r=
un
> > 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 t=
he
> 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 connectio=
n
> was
> initiated (not established) successfully and once the host not reachable
> (or
> 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
> recommend
> 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
>

[Attachment #5 (text/html)]

<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">&lt;<a \
href="mailto:b_mann@gmx.de" target="_blank">b_mann@gmx.de</a>&gt;</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> &gt; \
Hello<br> <br>
Hi<br>
<div><div><br>
&gt; I want use the &#39;bool connectToServer( QString, int )&#39; function in<br>
&gt; KGame(KGameNetwork) class, to connect to server. If the server is not run<br>
&gt; or the ip address is incorrect, always return true.<br>
&gt;<br>
&gt; In the API: &quot;Returns: true if connected&quot;.<br>
&gt;<br>
&gt; This is bug?<br>
&gt;<br>
&gt; I want show error messagge, when the connection is fail.<br>
<br>
</div></div>Looking at the code, I&#39;d say it&#39;s a lack of documentation. A \
comment in the<br> code:<br>
<br>
 // OK: We say that we already have connected, but this isn&#39;t so yet!<br>
 // If the connection cannot be established, it will look as being<br>
disconnected<br>
 // again (&quot;slotConnectionLost&quot; 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 &quot;lost&quot;.<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>
&gt; 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>



_______________________________________________
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