mirror of
https://github.com/2OOP/pism.git
synced 2026-02-04 19:04:49 +00:00
Added multithreaded TcpClient and TcpServer
This commit is contained in:
@@ -3,9 +3,11 @@ package org.toop;
|
||||
import org.toop.eventbus.Events;
|
||||
import org.toop.eventbus.GlobalEventBus;
|
||||
import org.toop.server.Server;
|
||||
import org.toop.server.backend.Testsss;
|
||||
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.toop.server.backend.local.TcpServer;
|
||||
|
||||
public class Main {
|
||||
private static final Logger logger = LogManager.getLogger(Main.class);
|
||||
@@ -16,11 +18,11 @@ public class Main {
|
||||
throw new RuntimeException("A event could not be initialized");
|
||||
}
|
||||
|
||||
TcpServer server = new TcpServer(5001);
|
||||
Thread serverThread = new Thread(server);
|
||||
serverThread.start();
|
||||
Server.start("REMOTE", "127.0.0.1", "5001");
|
||||
|
||||
GlobalEventBus.post(new Events.ServerEvents.command("HELP", "THANK"));
|
||||
GlobalEventBus.post(new Events.ServerEvents.command("GET"));
|
||||
|
||||
// Testsss.start(""); // Used for testing server.
|
||||
Window.start("");
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user