getDstPeerId static method

PeerId getDstPeerId(
  1. Uint8List datagram
)

Extracts the destination Peer ID from the datagram.

datagram The datagram containing the destination Peer ID.

Returns a PeerId representing the intended recipient of the message.

Implementation

static PeerId getDstPeerId(Uint8List datagram) => PeerId(
  value: datagram.sublist(
    PacketHeader.length + PeerId.length,
    headerLength,
  ),
);