title: Connect with a Swift client to a Java server using sockets
body: <p>How do I connect a Swift client to a Java server using sockets?
  How can I send different data types between the client and the server?</p>
  
  <pre><code>ServerSocket serverSocket = new ServerSocket(12345);
  
          while(true) {
  
              Socket socket = serverSocket.accept();
  
              System.out.println(new BufferedReader(new InputStreamReader(socket.getInputStream())).readLine());
  
          }
  </code></pre>