sendSync method
Sends a DCUtR SYNC message to addr:port and transitions the
state machine with onSyncReceived().
Implementation
Future<bool> sendSync(
InternetAddress addr,
int port,
List<int> observedAddr,
) async {
final message = DCUtRHandler().respondSync(observedAddr);
final bytes = Uint8List.fromList([..._magic, ...message.serialize()]);
_socket.send(bytes, addr, port);
_stateMachine.onSyncReceived();
return true;
}