edgeport - v1.0.3
    Preparing search index...

    Function decodeHeader

    • Reads the four header words of a framed PDU without decoding its body.

      Useful when the body will be discarded (an unsupported command) but the sequence_number is still needed to answer with a generic_nack.

      Parameters

      • bytes: Uint8Array

        A buffer beginning with a complete PDU at offset 0.

      Returns PduHeader

      The decoded header.

      If the buffer is shorter than the 16-byte header.

      1.0.3

      import { decodeHeader } from 'edgeport/smpp';

      const header = decodeHeader(pduBytes);
      console.log(header.command, header.sequence);