listener

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Listen9p

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

Listen9p implements a listener using the 9p protocol

func NewListen9p

func NewListen9p(addr string, key, cert string, debug bool) (Listen9p, error)

NewListen9p returns a new listener If a key and cert are provided, the listener will use TLS

func (Listen9p) Address

func (np Listen9p) Address() string

func (Listen9p) Auth

func (np Listen9p) Auth(ap *auth.Protocol) error

func (Listen9p) Listen

func (np Listen9p) Listen() error

func (Listen9p) Register

func (np Listen9p) Register(filer store.Filer, commander commander.Commander, callback callback.Callback) error

func (Listen9p) SetActivity added in v0.3.0

func (np Listen9p) SetActivity(act func(string))

func (Listen9p) Type added in v0.2.2

func (np Listen9p) Type() string

type Listener

type Listener interface {
	// Auth proxies the auth protocol for authentication
	Auth(*auth.Protocol) error
	// Address returns the dialstring of the listening service
	Address() string
	// Listen listens for client connections
	Listen() error
	// SetActivity is a callback used to notify when a client has read content from a particular buffer
	// It shuold reset the unread count for that given buffer to zero
	SetActivity(func(string))
	// Register accepts a Storage, and associates a Filer datatset with the Listener session
	// Additionally, a callback can be registered to allow on-connect/command information
	Register(store.Filer, commander.Commander, callback.Callback) error
	Type() string
}

Listener provides a type which can handle incoming client connections

type NewSsh

type NewSsh int

Jump to

Keyboard shortcuts

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