ebt

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MUXRPCHandler

type MUXRPCHandler struct {
	Sessions Sessions
	// contains filtered or unexported fields
}

func (*MUXRPCHandler) HandleCall

func (h *MUXRPCHandler) HandleCall(ctx context.Context, req *muxrpc.Request)

HandleCall handles the server side (getting called by client)

func (*MUXRPCHandler) HandleConnect

func (h *MUXRPCHandler) HandleConnect(ctx context.Context, e muxrpc.Endpoint)

HandleConnect does nothing. Feature negotiation is done by sbot

func (MUXRPCHandler) Handled

func (MUXRPCHandler) Handled(m muxrpc.Method) bool

func (*MUXRPCHandler) Loop

func (h *MUXRPCHandler) Loop(ctx context.Context, tx *muxrpc.ByteSink, rx *muxrpc.ByteSource, remoteAddr net.Addr)

Loop executes the ebt logic loop, reading from the peer and sending state and messages as requests

type Plugin

type Plugin struct{ *MUXRPCHandler }

func (Plugin) Handler

func (p Plugin) Handler() muxrpc.Handler

func (Plugin) Method

func (p Plugin) Method() muxrpc.Method

func (Plugin) Name

func (p Plugin) Name() string

type Sessions

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

func (*Sessions) Ended

func (s *Sessions) Ended(addr net.Addr)

Ended notifies the session store that a session has ended.

func (*Sessions) Started

func (s *Sessions) Started(addr net.Addr) *session

Started registers a new session for the network address and returns it. It also closes open channels in waitingFor if they exist and thus makes WaitFor() calls return.

func (*Sessions) WaitFor

func (s *Sessions) WaitFor(ctx context.Context, addr net.Addr, durr time.Duration) bool

WaitFor returns true if addr manages to start a session before durration passes

Jump to

Keyboard shortcuts

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