handleAgentPacket method

void handleAgentPacket(
  1. Channel channel,
  2. SerializableInput agentPacketS
)

Implementation

void handleAgentPacket(Channel channel, SerializableInput agentPacketS) {
  int agentPacketId = agentPacketS.getUint8();
  switch (agentPacketId) {
    case AGENTC_REQUEST_IDENTITIES.ID:
      handleAGENTC_REQUEST_IDENTITIES(channel);
      break;

    case AGENTC_SIGN_REQUEST.ID:
      handleAGENTC_SIGN_REQUEST(
          channel, AGENTC_SIGN_REQUEST()..deserialize(agentPacketS));
      break;

    default:
      if (print != null) {
        print('$hostport: unknown agent packet number: $agentPacketId');
      }
      break;
  }
}