gopacket: github.com/google/gopacket/defrag/lcmdefrag Index | Files

package lcmdefrag

import "github.com/google/gopacket/defrag/lcmdefrag"

Package lcmdefrag contains a defragmenter for LCM messages.

Index

Package Files

lcmdefrag.go

type LCMDefragmenter Uses

type LCMDefragmenter struct {
    // contains filtered or unexported fields
}

LCMDefragmenter supports defragmentation of LCM messages.

References

https://lcm-proj.github.io/
https://github.com/lcm-proj/lcm

func NewLCMDefragmenter Uses

func NewLCMDefragmenter() *LCMDefragmenter

NewLCMDefragmenter returns a new LCMDefragmenter.

func (*LCMDefragmenter) Defrag Uses

func (ld *LCMDefragmenter) Defrag(in *layers.LCM) (out *layers.LCM, err error)

Defrag takes a reference to an LCM packet and processes it. In case the packet does not need to be defragmented, it immediately returns the as in passed reference. In case in was the last missing fragment, out will be the defragmented packet. If in was a fragment, but we are awaiting more, out will be set to nil. In the case that in was nil, we will just run the internal cleanup of the defragmenter that times out packages. If an error was encountered during defragmentation, out will also be nil, while err will contain further information on the failure.

Package lcmdefrag imports 4 packages (graph). Updated 2018-06-04. Refresh now. Tools for package owners.