mirror of
https://github.com/2OOP/pism.git
synced 2026-02-04 10:54:51 +00:00
Basic globaleventbus
This commit is contained in:
@@ -1,7 +1,20 @@
|
||||
package org.toop;
|
||||
|
||||
import org.toop.server.Server;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
Server server = new Server("0.0.0.0", "5000");
|
||||
|
||||
Server server = new Server(Server.ServerBackend.LOCAL, "127.0.0.1", "5000");
|
||||
server.setBackend(Server.ServerBackend.REMOTE);
|
||||
|
||||
GlobalEventBus.INSTANCE.get().register(new LoggerListener());
|
||||
|
||||
Server.Message msg = server.sendCommand(Server.Command.LOGIN, "move");
|
||||
server.sendCommand(Server.Command.LOGIN, "test");
|
||||
|
||||
System.out.println(msg);
|
||||
System.out.println(server);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user