private static void processConnections() {
		// TODO Auto-generated method stub
		do {
			int numKeys;
			try {
				numKeys = selector.select();
				if (numKeys > 0) {
					Set<SelectionKey> eventKeys = selector.selectedKeys();
					Iterator<SelectionKey> keyCycler = eventKeys.iterator();
					while (keyCycler.hasNext()) {
						SelectionKey key = keyCycler.next();
						int keyOps = key.readyOps();
						if ((keyOps & SelectionKey.OP_ACCEPT) == SelectionKey.OP_ACCEPT) {
							acceptConnection(key);
							continue;
						}
						if ((keyOps & SelectionKey.OP_READ) == SelectionKey.OP_READ) {
							acceptData(key);
						}
					}
				}
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
				System.exit(1);
			}
		} while (true);
	}