X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Futils%2Fserial%2Fserver%2FServerBridge.java;h=b97699622b3a8e8b0c2325a758c9eb3f5b567eb3;hb=3087aeb5f7b9fffcb57d51030c4674f9768e7f02;hp=25d451c51577cb581c05c1daf14e702aec99b86b;hpb=29fd216d455363af8bd4adb1e3325645b0ba7fb5;p=nikiroo-utils.git diff --git a/src/be/nikiroo/utils/serial/server/ServerBridge.java b/src/be/nikiroo/utils/serial/server/ServerBridge.java index 25d451c..b976996 100644 --- a/src/be/nikiroo/utils/serial/server/ServerBridge.java +++ b/src/be/nikiroo/utils/serial/server/ServerBridge.java @@ -9,6 +9,7 @@ import java.net.UnknownHostException; import be.nikiroo.utils.StringUtils; import be.nikiroo.utils.TraceHandler; +import be.nikiroo.utils.Version; import be.nikiroo.utils.serial.Importer; /** @@ -127,16 +128,17 @@ public class ServerBridge extends Server { // Bad impl, not up to date (should work, but not efficient) return new ConnectActionServerString(s, key) { @Override - public void action() throws Exception { - onClientContact(); + public void action(Version clientVersion) throws Exception { + onClientContact(clientVersion); final ConnectActionServerString bridge = this; try { new ConnectActionClientString(forwardToHost, forwardToPort, forwardToKey) { @Override - public void action() throws Exception { - onServerContact(); + public void action(Version serverVersion) + throws Exception { + onServerContact(serverVersion); for (String fromClient = bridge.rec(); fromClient != null; fromClient = bridge .rec()) { @@ -165,15 +167,15 @@ public class ServerBridge extends Server { /** * This is the method that is called each time a client contact us. */ - protected void onClientContact() { - getTraceHandler().trace(">>> CLIENT "); + protected void onClientContact(Version clientVersion) { + getTraceHandler().trace(">>> CLIENT " + clientVersion); } /** * This is the method that is called each time a client contact us. */ - protected void onServerContact() { - getTraceHandler().trace("<<< SERVER"); + protected void onServerContact(Version serverVersion) { + getTraceHandler().trace("<<< SERVER " + serverVersion); getTraceHandler().trace(""); }