import java.net.ServerSocket;
import java.net.Socket;

public class ServeurTCP {
	public static void main(String args[]) throws Exception {
		// Create a server socket listening on TCP/6017
		ServerSocket ssg = new ServerSocket(6017);

		while(true) {
			// Waiting for a connection then accept
			Socket csocket = ssg.accept();

			//create a object Tqotd who will run in a thread
			Tqotd a = new Tqotd(csocket);
			Thread t = new Thread(a);
			//start the thread
			t.start();

		}


	}
}
