From cb5215176f5c0a0a7b16747e333e08cbdee51038 Mon Sep 17 00:00:00 2001 From: SergiX44 Date: Mon, 8 Jun 2015 21:22:03 +0200 Subject: [PATCH] little changes --- src/it/ksuploader/main/MainServer.java | 7 ------- src/it/ksuploader/main/RequestHandler.java | 3 +-- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/it/ksuploader/main/MainServer.java b/src/it/ksuploader/main/MainServer.java index 2c088b8..9d5e8cd 100644 --- a/src/it/ksuploader/main/MainServer.java +++ b/src/it/ksuploader/main/MainServer.java @@ -14,12 +14,8 @@ public class MainServer { private ServerSocketChannel serverSocketChannel; public static LoadConfig config = new LoadConfig(); - private static MainServer instance; public static PrintWriter logger; - public static MainServer getInstance() { - return instance; - } // SocketChannel socketChannel = null; // ServerSocketChannel serverSocketChannel = null; @@ -57,9 +53,6 @@ private void start() { } } - public void stop() { - log("Server stopped!"); - } static void log(String toPrint) { System.out.println(toPrint); diff --git a/src/it/ksuploader/main/RequestHandler.java b/src/it/ksuploader/main/RequestHandler.java index 10779bc..9e9d8fd 100644 --- a/src/it/ksuploader/main/RequestHandler.java +++ b/src/it/ksuploader/main/RequestHandler.java @@ -11,7 +11,6 @@ public class RequestHandler implements Runnable { private SocketChannel socketChannel; private DataInputStream dis; private DataOutputStream dos; - private String type; public RequestHandler(SocketChannel socketChannel) { this.socketChannel = socketChannel; @@ -42,7 +41,7 @@ public void run() { MainServer.log("Client Authenticated"); // Aspetto e leggo il type - type = dis.readUTF(); + String type = dis.readUTF(); MainServer.log("fileType: " + type); // Informo il client della ricezione e così parte l'upload