Version: v0.13.0 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2023 License: Apache-2.0 Imports: 5 Imported by: 7




This section is empty.


This section is empty.


This section is empty.


type Buffer

type Buffer struct{ bytes.Buffer }

func NewBuffer

func NewBuffer(buf []byte) *Buffer

func (*Buffer) Len

func (b *Buffer) Len() uint16

func (*Buffer) MarshalBinary

func (b *Buffer) MarshalBinary() (data []byte, err error)

func (*Buffer) UnmarshalBinary

func (b *Buffer) UnmarshalBinary(data []byte) error

type BufferPool

type BufferPool struct {
	Empty chan *bytes.Buffer

func NewBufferPool

func NewBufferPool() *BufferPool

type Message

type Message interface {
	MarshalBinary() (data []byte, err error)
	UnmarshalBinary(data []byte) error

	Len() uint16

type MessageStream

type MessageStream struct {

	// OpenFlow Version
	Version uint8
	// Channel on which to publish connection errors
	Error chan error
	// Channel on which to publish inbound messages
	Inbound chan Message
	// Channel on which to receive outbound messages
	Outbound chan Message
	// Channel on which to receive a shutdown command
	Shutdown chan bool
	// contains filtered or unexported fields

func NewMessageStream

func NewMessageStream(conn net.Conn, parser Parser) *MessageStream

Returns a pointer to a new MessageStream. Used to parse OpenFlow messages from conn.

func (*MessageStream) GetAddr

func (m *MessageStream) GetAddr() net.Addr

type Parser

type Parser interface {
	Parse(b []byte) (message Message, err error)

Parser interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL