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

List:       kde-games-devel
Subject:    Re: [Kde-games-devel] Network operations class?
From:       Rob Kaper <cap () capsi ! com>
Date:       2001-04-19 4:39:28
[Download RAW message or body]

On Mon, Apr 16, 2001 at 09:55:44PM +0200, Andreas Beckermann wrote:
> For game communication: well look if you can use KGameClient.
<snip>
> Then call sendMessage() to send your QByteArray or QDataStream message. See 
> QT Docu for QDataStreams. The other client will emit signalSendMesage and 
> that's it. 

In my case there will not be another client, but a dedicated (non-Qt)
server. However, when I do this:

KGameClientSocket *game_sock = new KGameClientSocket("localhost", 1234, this);

[client connects. great. lets send a command]

QByteArray msg;
QDataStream s(msg , IO_WriteOnly);
s << ".gl";
game_sock->sendMessage(msg);

[oops.]

My server does not get ".gl" as input. Makes sense, because Qt of course
mangles the data stream to be independant of lots of stuff. Nonetheless, is
it possible to send raw data over the game socket with KGameClient? Some
games (mine) will not connect to another Qt/KDE application, but to a
dedicated server.

Rob
-- 
Rob Kaper     | 'What? In riddles?' said Gandalf. 'No! For I was talking
cap@capsi.com | aloud to myself. A habit of the old: they choose the wisest
www.capsi.com | person present to speak to; the long explanations needed by
              | the young are wearying.' - "Lord of the Rings", JRR Tolkien
_______________________________________________
Kde-games-devel mailing list
Kde-games-devel@master.kde.org
http://master.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