title: Trouble with sending / receiving data
body: <p>So I am attempting to send data to myself and receive the data then print it, now I have been testing for a while and I have noticed its not sending anything, in fact, maybe it is and I am not receiving it properly, I need assistance with this please.</p>
  
  <p>This is what I am using to send data</p>
  
  <pre class="lang-java prettyprint-override"><code>        String host = "127.0.0.1";
          int port = Options.port;
          Socket socket = new Socket(host, port);
          OutputStream os = socket.getOutputStream();
          OutputStreamWriter osw = new OutputStreamWriter(os);
          BufferedWriter bw = new BufferedWriter(osw);
          bw.write(msg + "\n");
          bw.flush();
  </code></pre>
  
  <p>This is what I am using to receive, I always use this method and it never works so I would not be surprised if this was the root cause.</p>
  
  <pre class="lang-java prettyprint-override"><code>        ServerSocket serverSocket = new ServerSocket(Options.port);
          System.out.println("[Listening on port] " + Options.port);
  
          while(true){
              Socket socket = serverSocket.accept();
              socket = serverSocket.accept();
              InputStream is = socket.getInputStream();
              InputStreamReader isr = new InputStreamReader(is);
              BufferedReader br = new BufferedReader(isr);
              String message = br.readLine();
                  System.out.println(message);
          }
  </code></pre>