@Override
	protected void respond(Channel channel) throws IOException {
		ProtocolData received = new ProtocolData(buffer);
		if (received.getMessage() == ProtocolMessage.CONNECTION_OK) {
			ps.printf("[Conexão: %s]\n", df.format(new Date()));
			connectionOK(channel, received);
		} 
		else if (received.getMessage() == ProtocolMessage.LOGIN_REQUEST) {
			String userName = received.getHeaderLine(0);
			ps.printf("[Solicitação de login (%s): %s]\n", userName, df.format(new Date()));
			loginRequest(channel, received);
		}
		else if (received.getMessage() == ProtocolMessage.USERS_REQUEST) {
			ps.printf("[Solicitação de usuários: %s]\n", df.format(new Date()));
			usersRequest(channel);
		}
		else if (received.getMessage() == ProtocolMessage.CHAT_REQUEST) {
			String requested = received.getHeaderLine(0);
			String sender = received.getHeaderLine(1);
			ps.printf("[Solicitação de bate-papo (%s -> %s): %s]\n", sender, requested, df.format(new Date()));
			chatRequest(channel, received);
		}
		else if (received.getMessage() == ProtocolMessage.CHAT_END) {
			String userName = received.getHeaderLine(0);
			ps.printf("[Solicitação de encerramento de bate-papo (%s): %s]\n", userName, df.format(new Date()));
			chatEnd(channel, received);
		}
		else if (received.getMessage() == ProtocolMessage.TRANSFER_REQUEST) {
			String receiver = received.getHeaderLine(0);
			String sender = received.getHeaderLine(1);
			ps.printf("[Solicitação de transferência (%s -> %s): %s]\n", sender, receiver, df.format(new Date()));
			transferRequest(channel, received);
		}
		else if (received.getMessage() == ProtocolMessage.LOGOUT_REQUEST) {
			String userName = received.getHeaderLine(0);
			ps.printf("[Solicitação de logout (%s): %s]\n", userName, df.format(new Date()));
			logoutRequest(channel, received);
		}
		else if (received.getMessage() == ProtocolMessage.HEART_BEAT) {
			String userName = received.getHeaderLine(0);
			ps.printf("[Hear beat (%s): %s]\n", userName, df.format(new Date()));
			heartBeat(received);
		}
	}