X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Futils%2Fserial%2Fserver%2FConnectActionServer.java;h=350d3fe40a1320b68f555458a43c3ceec11e8c25;hb=5584adbbbf5444c0039fed2b35dc7d5bb57b71b1;hp=699f3074b44b228ac797e186c0f18da58208d08c;hpb=8468bb79f0fc9c88fa21355509731625732eb10e;p=nikiroo-utils.git diff --git a/src/be/nikiroo/utils/serial/server/ConnectActionServer.java b/src/be/nikiroo/utils/serial/server/ConnectActionServer.java index 699f307..350d3fe 100644 --- a/src/be/nikiroo/utils/serial/server/ConnectActionServer.java +++ b/src/be/nikiroo/utils/serial/server/ConnectActionServer.java @@ -23,8 +23,7 @@ abstract class ConnectActionServer { protected ConnectAction action; /** - * Create a new {@link ConnectActionServer} with the current application - * version (see {@link Version#getCurrentVersion()}) as the server version. + * Create a new {@link ConnectActionServer}, using the current version. * * @param s * the socket to bind to @@ -44,11 +43,11 @@ abstract class ConnectActionServer { * @param key * an optional key to encrypt all the communications (if NULL, * everything will be sent in clear text) - * @param version - * the server version + * @param serverVersion + * the version of this server,that will be sent to the client */ - public ConnectActionServer(Socket s, String key, Version version) { - action = new ConnectAction(s, true, key, version) { + public ConnectActionServer(Socket s, String key, Version serverVersion) { + action = new ConnectAction(s, true, key, serverVersion) { @Override protected void action(Version clientVersion) throws Exception { ConnectActionServer.this.action(clientVersion); @@ -128,14 +127,14 @@ abstract class ConnectActionServer { * @return the amount of bytes sent */ public long getBytesSent() { - return action.getBytesSent(); + return action.getBytesWritten(); } /** * Method that will be called when an action is performed on the server. * * @param clientVersion - * the client version + * the version of the client connected to this server * * @throws Exception * in case of I/O error