pyndn.lp package

Submodules

pyndn.lp.incoming_face_id module

This module defines the IncomingFaceId class which represents the incoming face ID header field in an NDNLPv2 packet. http://redmine.named-data.net/projects/nfd/wiki/NDNLPv2

class pyndn.lp.incoming_face_id.IncomingFaceId[source]

Bases: object

getFaceId()[source]

Get the incoming face ID value.

Returns:The face ID value.
Return type:int
static getFirstHeader(lpPacket)[source]

Get the first header field in lpPacket which is an IncomingFaceId. This is an internal method which the application normally would not use.

Parameters:lpPacket (LpPacket) – The LpPacket with the header fields to search.
Returns:The first IncomingFaceId header field, or None if not found.
Return type:IncomingFaceId
setFaceId(faceId)[source]

Set the face ID value.

Parameters:faceId (int) – The incoming face ID value.

pyndn.lp.lp_packet module

This module defines the LpPacket class which 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

class pyndn.lp.lp_packet.LpPacket[source]

Bases: object

addHeaderField(headerField)[source]

Add a header field. To add the fragment, use setFragmentWireEncoding().

Parameters:headerField (object) – The header field to add.
clear()[source]

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

countHeaderFields()[source]

Get the number of header fields. This does not include the fragment.

Returns:The number of header fields.
Return type:int
getFragmentWireEncoding()[source]

Get the fragment wire encoding.

Returns:The wire encoding, or an isNull Blob if not specified.
Return type:Blob
getHeaderField(index)[source]

Get the header field at the given index.

Parameters:index (int) – The index, starting from 0. It is an error if index is greater to or equal to countHeaderFields().
Returns:The header field at the index.
Return type:object
setFragmentWireEncoding(fragmentWireEncoding)[source]

Set the fragment wire encoding.

Parameters:fragmentWireEncoding (Blob) – The fragment wire encoding or an isNull Blob if not specified.

Module contents

Table Of Contents

Previous topic

pyndn.impl package

Next topic

pyndn.security package

This Page