controller

package
v0.0.0-...-70695b7 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2021 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller interface {
	Put(sck *socket.Socket) error
	Evict(sckID string) error
	Deliver(p *packet.Packet) error
	AttachListener(l *ports.Listener) error
	DetachListener(port uint16) error
}

Controller represents the rdtp ports controller. It allocates and deallocates rdtp sockets and listeners.

type MemoryController

type MemoryController struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

MemoryController represents an in-memory rdtp ports manager. It allocates and deallocates rdtp sockets and listeners.

func NewMemoryController

func NewMemoryController() *MemoryController

NewMemoryController returns an initialized in-memory rdtp sockets manager

func (*MemoryController) AttachListener

func (m *MemoryController) AttachListener(l *ports.Listener) error

AttachListener attaches a listener to a port

func (*MemoryController) Deliver

func (m *MemoryController) Deliver(p *packet.Packet) error

Deliver delivers an inbound rdtp packet

func (*MemoryController) DetachListener

func (m *MemoryController) DetachListener(port uint16) error

DetachListener detaches a listener from a port

func (*MemoryController) Evict

func (m *MemoryController) Evict(id string) error

Evict removes a socket given its id

func (*MemoryController) Put

func (m *MemoryController) Put(s *socket.Socket) error

Put attaches a socket to the controller

Jump to

Keyboard shortcuts

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