package reseau_tp_1;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.GregorianCalendar;

public class ServerTcp {
	private int port;
	
	public ServerTcp(int port) throws IOException{
		this.port = port;
		run();
	}
	
	private void run() throws IOException{
		Socket client;
		BufferedWriter out;
		BufferedReader in;
		ServerSocket server = new ServerSocket(this.port);
		for(;;){
			client = server.accept();
			out = new BufferedWriter(new OutputStreamWriter(
					client.getOutputStream()));
			String date = new GregorianCalendar().getTime().toString();
			out.write(date);
			out.newLine();
			out.flush();
			client.close();
		}
	}
	
	public static void main(String[] args) {
		try {
			ServerTcp tcp_server = new ServerTcp(5014);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

}

@@ -442,29 +442,8 @@
 ut;%0A
-%09%09BufferedReader in;%0A
 %09%09Se

Update server_tcp.java