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 ¶
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
Click to show internal directories.
Click to hide internal directories.