public static void main(String args[]) throws IOException {
		ServerSocket srvr = null;
		Socket skt = null;
		int port = 1234;
		
		if (args.length != 0) 
			port = Integer.parseInt(args[0]);
		
		try {
			srvr = new ServerSocket(port);
			System.out.println("Server running on port " + port);
			while (true) {
				skt = srvr.accept();
				new ServerThread(skt).run();
			}

		} catch(Exception e) {
			System.out.print("Whoops! It didn't work!\n");
		} finally {
			if (srvr != null) srvr.close();
			if (skt != null) skt.close();
		}
	}