Commit b7309388 authored by Hyun Soo  Kim's avatar Hyun Soo Kim
Browse files

clean dependencies, reformat to Google style guide

parent 0b1e5c39
Loading
Loading
Loading
Loading
+83 −77
Original line number Diff line number Diff line
import java.io.*;
import java.net.*;
package edu.bu.ec504.project;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.net.ConnectException;
import java.net.ServerSocket;
import java.net.Socket;

public class Main {

  /**
   * Method to run the client side of the program
   *
   * @param clientSocket
   * @param argument
   * @throws IOException
@@ -77,8 +84,7 @@ public class Main {
    try (Socket clientSocket = new Socket("localhost", PORT_NUMBER)) {
      // If a client connection is successful, run the client side of the program
      runClient(clientSocket, filename);
        }
        catch (ConnectException e) {
    } catch (ConnectException e) {
      // If a client connection fails, run the server side of the program
      ServerSocket serverSocket = new ServerSocket(PORT_NUMBER);
      serverSocket.setSoTimeout(60 * 1000);