package test;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.SocketException;
public class TestThread {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		try{
			ServerSocket ssocket = new ServerSocket(8888);
			AcceptThread at = new test.AcceptThread(ssocket);
				System.out.println("Start socket");
				at.start();
				Thread.sleep(1000);
//				at.interrupt();
//				at.stopByInterrupt();
//				at.stopByClosingSocket();
				System.out.println(Thread.currentThread());
				System.out.println("Close socket");
		}catch(SocketException e){
			e.printStackTrace();
		}catch (IOException ioe){
			ioe.printStackTrace();
		}catch(Exception e){
			e.printStackTrace();
		}
	}

}
