startHandshake method

  1. @override
void startHandshake(
  1. Device device
)
override

Starts handshake protocol. This will be executed every new device connection

Implementation

@override
void startHandshake(Device device) {
  // In experimental mode, the handshake message includes the public key to be used
  // for this device authentication
  logger.d("Staring handshake process with device ${device.endpointId}");
  var message =
      NearbyMessage.handshakeMessage(signingManager.convertPublicToJwk()!);
  device.sendMessage(message, dropMessage: true);
}