public void updateNetwork() {
		try {
			while (selector.selectNow() > 0) {
				for (Iterator<SelectionKey> it = selector.selectedKeys().iterator(); it.hasNext(); ) {
					SelectionKey key = it.next();
					handleReadyKey(key);
					it.remove();
				}
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}