Captive Imagination
September 06, 2010, 09:06:45 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Check out the teaser site for the first official game by Captive Imagination: http://www.galaxiesbeyond.com
 
   Home   Help Search Calendar Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Message send problem  (Read 451 times)
0 Members and 1 Guest are viewing this topic.
Mewel
Newbie
*
Offline Offline

Posts: 4


View Profile
« on: December 04, 2008, 02:21:23 PM »

Hi,

I have a problem with sending messages to a server. I wrote a small gamelobby, which is simliar to the chatclient/server sample, except it doesnt work Smiley.

The problem occours in the class "DefaultLobbyClientModel":
Code:
protected void sendPlayerInfoToServer(LobbyPlayer player) {
LobbyPlayerConnectionMessage m = new LobbyPlayerConnectionMessage();
m.setPlayer(player);
m.setConnectionStatus(LobbyPlayerConnectionMessage.PLAYER_CONNECTED);
client.sendToServer(m); // -> sends nothing to the server
// client.broadcast(m); // the same
}

I uploaded the code, because there are some files:
http://web8.vs188242.vserver.de/mewel/lobby.zip

Hope someone can look at the code Smiley
Logged
darkfrog
Administrator
Inspired Imagination
*****
Offline Offline

Posts: 2650


View Profile
« Reply #1 on: December 04, 2008, 03:32:28 PM »

...so what is the error you're getting?  Shocked

Also, post the code (in the forum) to LobbyPlayer as there might be something that is causing issues with serialization.

Sorry, don't have time to download your project and dig through it.
Logged
Mewel
Newbie
*
Offline Offline

Posts: 4


View Profile
« Reply #2 on: December 04, 2008, 04:53:25 PM »

Thats the problem, I get no error. The message doesnt reach the server. It is required to serialize all classes which are contained in a message?

€: wow, I serialized the class, and now it works perfect, big thx!
« Last Edit: December 04, 2008, 05:00:51 PM by Mewel » Logged
darkfrog
Administrator
Inspired Imagination
*****
Offline Offline

Posts: 2650


View Profile
« Reply #3 on: December 04, 2008, 07:38:59 PM »

Glad you got it figured out. Smiley
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.179 seconds with 20 queries.