public void run() {
		Thread.currentThread().setName("ChatSocketServer");
		ServerSocket serverSocket = null;
		try {
			serverSocket = new ServerSocket(port);
		} catch (IOException e1) {
			e1.printStackTrace();
		}
		System.out.println("ChatServer listening on " + port + "...");
		while (listening) {
			try {
				Socket socket = serverSocket.accept();
				System.out.println("Socket created at " + socket.getPort());
				VanillaSocketThread myThread = new ChatSocketThread(socket);
				(new Thread(myThread)).start();
			} catch (Exception e) {
				System.out
						.println("Gracefully dealt with error in "
						/* + getClass().getTypeName() */+ ",Exception"
								+ e.getMessage());
			}
		}

	}