Class: LpPacket

LpPacket

new LpPacket()

An LpPacket represents an NDNLPv2 packet including header fields an an optional fragment. This is an internal class which the application normally would not use. http://redmine.named-data.net/projects/nfd/wiki/NDNLPv2
Source:

Methods

addHeaderField(headerField)

Add a header field. To add the fragment, use setFragmentWireEncoding().
Parameters:
Name Type Description
headerField object The header field to add.
Source:

clear()

Remove all header fields and set the fragment to an isNull Blob.
Source:

countHeaderFields() → {number}

Get the number of header fields. This does not include the fragment.
Source:
Returns:
The number of header fields.
Type
number

getFragmentWireEncoding() → {Blob}

Get the fragment wire encoding.
Source:
Returns:
The wire encoding, or an isNull Blob if not specified.
Type
Blob

getHeaderField(index) → {object}

Get the header field at the given index.
Parameters:
Name Type Description
index number The index, starting from 0. It is an error if index is greater to or equal to countHeaderFields().
Source:
Returns:
The header field at the index.
Type
object

setFragmentWireEncoding(fragmentWireEncoding)

Set the fragment wire encoding.
Parameters:
Name Type Description
fragmentWireEncoding Blob The fragment wire encoding or an isNull Blob if not specified.
Source: