[Kde-games-devel] Re: Sending a message to one KGame client

Martin Heni kde-games-devel@mail.kde.org
Tue, 25 Feb 2003 22:02:59 +0100


>I think (didn't try - Martin? Do you still remember this one?) that you can
>already provide the KPlayer::id() to KGame::sendMessage() which will then end
>up in the desired KPlayer (KPlayer::networkTransmission()).

I also "think" ;-) that a sendMessage() can incorporate the player and/or
game ID. The network transmission of the corresponding game will
then filter the message and forward it to the player's networkTransmission
function. There is somewhere the GameMessage::createId() function which
adds player and game id to a global id. Something like this anyway.

However, I think this is not necessarily the function wanted in Neils
application. I suppose it would be better to just target the games with
the direct messaged sent. I would assume in this concept he has
only one (real) player per game anyway?

So I would just send a user message directly to game XYZ and then
analyse the incoming messages (signal exists) and perform some actions
depending on the ID's of the messages. In this respect all can be
drivern by direct addresses user messages. This should be quite easily
implemented.