@Override
	public ByteBuffer encode(Message message) {
		switch (getSession().getState()) {
		case CONNECTED:
		case LOGGING_IN:
			return loginEncoder.encode(message);
		case UPDATING:
			// TODO: Update encoder.
			break;
		case LOGGED_IN:
			// TODO: Game stream encoding.
			break;
		}
		return null;
	}