mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 22:38:43 +00:00
Upon hosting, and then creating a new instance and connecting to that IP, button transmissions work and print out on server!! :D
Took the send method out of the Message class as it didnt make sense to have it there. This meant taking it out of all subclasses too tags: #story[1055] pair[wmu16, zyt10]
This commit is contained in:
@@ -306,14 +306,11 @@ public class GameServerThread implements Runnable, Observer, ClientConnectionDel
|
||||
sendXml();
|
||||
}
|
||||
|
||||
void unicast(Message message, SocketChannel client) throws IOException {
|
||||
message.send(client);
|
||||
}
|
||||
|
||||
void broadcast(Message message) throws IOException{
|
||||
for(Player player : GameState.getPlayers()) {
|
||||
//System.out.println("Sending message seqNo[" + seqNum + "] to Player: " + player.toString());
|
||||
message.send(player.getSocketChannel());
|
||||
//heh
|
||||
player.getSocketChannel().socket().getOutputStream().write(message.getBuffer());
|
||||
}
|
||||
seqNum++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user