la til en function som lar deg sendet et objekt til bare en client

This commit is contained in:
Tobydrama 2020-04-14 14:48:33 +02:00
parent b1892e3447
commit ce97c92325

View File

@ -53,8 +53,13 @@ public class RoboRallyServer {
public void sendToAllClients(Object object) { public void sendToAllClients(Object object) {
server.sendToAllTCP(object); server.sendToAllTCP(object);
} }
public void sendToClient(Connection connection, Object object){
server.sendToTCP(connection.getID(),object);
}
} }
/** /**
* This listener handles all sending and responses for the server * This listener handles all sending and responses for the server
*/ */