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