X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Futils%2Fserial%2Fserver%2FConnectActionServer.java;h=699f3074b44b228ac797e186c0f18da58208d08c;hb=8468bb79f0fc9c88fa21355509731625732eb10e;hp=10d3440e7af4a4a09e5b7cdf06151ab15ac98f66;hpb=a72ea8a7a30837734f7f3f27a4ec7979d2549043;p=fanfix.git diff --git a/src/be/nikiroo/utils/serial/server/ConnectActionServer.java b/src/be/nikiroo/utils/serial/server/ConnectActionServer.java index 10d3440..699f307 100644 --- a/src/be/nikiroo/utils/serial/server/ConnectActionServer.java +++ b/src/be/nikiroo/utils/serial/server/ConnectActionServer.java @@ -28,9 +28,12 @@ abstract class ConnectActionServer { * * @param s * the socket to bind to + * @param key + * an optional key to encrypt all the communications (if NULL, + * everything will be sent in clear text) */ - public ConnectActionServer(Socket s) { - this(s, Version.getCurrentVersion()); + public ConnectActionServer(Socket s, String key) { + this(s, key, Version.getCurrentVersion()); } /** @@ -38,11 +41,14 @@ abstract class ConnectActionServer { * * @param s * the socket to bind to + * @param key + * an optional key to encrypt all the communications (if NULL, + * everything will be sent in clear text) * @param version * the server version */ - public ConnectActionServer(Socket s, Version version) { - action = new ConnectAction(s, true, version) { + public ConnectActionServer(Socket s, String key, Version version) { + action = new ConnectAction(s, true, key, version) { @Override protected void action(Version clientVersion) throws Exception { ConnectActionServer.this.action(clientVersion); @@ -87,6 +93,8 @@ abstract class ConnectActionServer { *

* Example of usage: the client failed an authentication check, cut the * connection here and now. + * + * @return TRUE when it is */ public boolean isClosing() { return closing;