hostnetwork

package
v0.0.0-...-05bc493 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHostNetwork

func NewHostNetwork(nodeRef string) (network.HostNetwork, error)

NewHostNetwork constructor creates new NewHostNetwork component

func NewNetwork

func NewNetwork(host legacyhost.Host) (network.HostNetwork, error)

func SendPacket

func SendPacket(ctx context.Context, pool pool.ConnectionPool, p *rms.Packet) error

SendPacket sends packet using connection from pool

Types

type RequestHandler

type RequestHandler func(ctx context.Context, p *packet.ReceivedPacket)

RequestHandler is callback function for request handling

type StreamHandler

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

StreamHandler parses packets from data stream and calls request handler or response handler

func NewStreamHandler

func NewStreamHandler(requestHandler RequestHandler, responseHandler future.PacketHandler) *StreamHandler

NewStreamHandler creates new StreamHandler

func (*StreamHandler) HandleStream

func (s *StreamHandler) HandleStream(ctx context.Context, address string, reader io.ReadWriteCloser)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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