void doNetworkIO()
	{
		try
		{
			if (selector.selectNow() > 0)
			{
				Iterator<SelectionKey> it = selector.selectedKeys().iterator();
				while (it.hasNext())
				{
					SelectionKey key = it.next();
					Session session = socChanMap.get(key.channel());
					it.remove();

					try
					{
						if (!key.isValid())
						{
							continue;
						}

						if (key.isReadable())
						{
							socChanMap.get(key.channel()).getConnection().read();
						}
						if (key.isWritable())
						{
							socChanMap.get(key.channel()).getConnection().doWrites();
						}
						if (key.isConnectable())
						{
							finishConnection(key);
						}
					}
					catch (CancelledKeyException ke) 
					{
						session.disconnected(ke);
					}
				}
			}
		}
		catch (IOException e)
		{
			e.printStackTrace();
		}
	}