@@ -0,0 +1,1725 @@
+/** Version 1.0%0A**/%0A%0A%0Aimport java.net.*;%0Aimport java.io.*;%0A%0Apublic class vkServer %7B%0A    public static void main(String%5B%5D args) throws IOException %7B%0A%0A        int portNumber;%0A        if (args.length != 1) %7B%0A            System.out.println(%22Automatic assigned to port number 4444%22);%0A            portNumber = 4444;%0A%0A        %7D%0A        else%7B%0A          portNumber = Integer.parseInt(args%5B0%5D);%0A        %7D%0A%0A%0A%0A        try (%0A            //Initialize the port number%0A            ServerSocket serverSocket = new ServerSocket(portNumber);%0A            Socket clientSocket = serverSocket.accept(); //Connection from client%0A%0A            PrintWriter out =%0A                new PrintWriter(clientSocket.getOutputStream(), true); //Message that want to send to client%0A            BufferedReader in = new BufferedReader(%0A                new InputStreamReader(clientSocket.getInputStream())); //Message that received from client%0A        ) %7B%0A            System.out.println(%22Successful connect to port %22 + portNumber);%0A            String inputLine, outputLine;%0A%0A            // Initiate conversation with client%0A            vkProtocol protocol = new vkProtocol();%0A            outputLine = protocol.processInput(null);%0A            out.println(outputLine);%0A%0A            while ((inputLine = in.readLine()) != null) %7B%0A                outputLine = protocol.processInput(inputLine);%0A                out.println(outputLine);%0A                if (outputLine.equals(%22Bye.%22))%0A                    break;%0A            %7D%0A        %7D catch (IOException e) %7B%0A            System.out.println(%22Exception caught when trying to listen on port %22%0A                + portNumber + %22 or listening for a connection%22);%0A            System.out.println(e.getMessage());%0A        %7D%0A    %7D%0A%7D%0A

Create vkServer.java