PPT Slide
sock = new ServerSocket(portnum);
} catch (IOException e) { }
System.out.println("Now listening at port " + portnum);
Socket clientSocket = null;
clientSocket = sock.accept();
} catch (IOException e) { }
InputStream in = clientSocket.getInputStream();
OutputStream out = clientSocket.getOutputStream();
System.out.println("Connection established.");
Creating the server socket