Software Platform Notes Java Technology
Massimo Maresca · CINECA IRIS Institutial Research Information System (University of Genoa) · 2019
java.net.*;public class MyTcpServer { public static void main(String [] args) throws IOException { ServerSocket sSoc = new ServerSocket(8500); Socket s = sSoc.accept();System.out.println("AfterAccept"); PrintStream out = new PrintStream(s.getOutputStream());try { Thread.sleep(4000);} catch (InterruptedException e) { e.printStackTrace(); } String strOut = new String ("