Documentation ¶
Overview ¶
Package ndn6file implements ndn6-file-server protocol. https://github.com/yoursunny/ndn6-tools/blob/main/file-server.md
Index ¶
Constants ¶
View Source
const ( TtSegmentSize = 0xF500 TtSize = 0xF502 TtMode = 0xF504 TtAtime = 0xF506 TtBtime = 0xF508 TtCtime = 0xF50A TtMtime = 0xF50C )
Assigned numbers.
Variables ¶
View Source
var KeywordLs = ndn.MakeNameComponent(an.TtKeywordNameComponent, []byte("ls"))
KeywordLs is the 32=ls component.
Functions ¶
This section is empty.
Types ¶
type DirectoryListing ¶
DirectoryListing contains a list of files and directories in a directory.
func (DirectoryListing) MarshalBinary ¶
func (ls DirectoryListing) MarshalBinary() (value []byte, e error)
MarshalBinary encodes to segmented object payload.
func (DirectoryListing) String ¶
func (ls DirectoryListing) String() string
func (*DirectoryListing) UnmarshalBinary ¶
func (ls *DirectoryListing) UnmarshalBinary(value []byte) (e error)
UnmarshalBinary decodes from segmented object payload.
type Metadata ¶
type Metadata struct { rdr.Metadata FinalBlock ndn.NameComponent SegmentSize int Size int64 Mode uint16 Atime time.Time Btime time.Time Ctime time.Time Mtime time.Time }
Metadata represents RDR metadata packet with file server extensions.
func (Metadata) MarshalBinary ¶
MarshalBinary encodes to TLV-VALUE.
func (Metadata) SegmentEnd ¶
SegmentEnd returns the last segment number plus one. If FinalBlock is unset, returns zero.
func (*Metadata) UnmarshalBinary ¶
UnmarshalBinary decodes from TLV-VALUE.
Click to show internal directories.
Click to hide internal directories.