Function packetLineBuffer

  • This will take a raw line and encode it as the pkt-line format. It adds a 4 byte length indicator to the beginning of a line. If a chanel is specified a chanel byte is appended just after the length indicator.

      pkt-line     =  data-pkt / flush-pkt
    data-pkt = pkt-len pkt-payload
    pkt-len = 4*(HEXDIG)
    pkt-payload = (pkt-len - 4)*(OCTET)

    Parameters

    • line: Buffer
    • Optional channel: 1 | 2 | 3

    Returns Buffer

Generated using TypeDoc