rfc2217

package
v1.0.52 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

https://www.rfc-editor.org/rfc/rfc2217.html

Index

Constants

View Source
const (
	COM_PORT_OPTION  = "\x2c"
	BCOM_PORT_OPTION = 44
	// TelnetOption and TelnetSubnegotiation states
	REQUESTED       = "REQUESTED"
	ACTIVE          = "ACTIVE"
	INACTIVE        = "INACTIVE"
	REALLY_INACTIVE = "REALLY_INACTIVE"
	// Client to Access Server
	SET_BAUDRATE        = "\x01"
	SET_DATASIZE        = "\x02"
	SET_PARITY          = "\x03"
	SET_STOPSIZE        = "\x04"
	SET_CONTROL         = "\x05"
	NOTIFY_LINESTATE    = "\x06"
	NOTIFY_MODEMSTATE   = "\x07"
	FLOWCONTROL_SUSPEND = "\x08"
	FLOWCONTROL_RESUME  = "\x09"
	SET_LINESTATE_MASK  = "\x0a"
	SET_MODEMSTATE_MASK = "\x0b"
	PURGE_DATA          = "\x0c"

	SERVER_SET_BAUDRATE        = "\x65"
	SERVER_SET_DATASIZE        = "\x66"
	SERVER_SET_PARITY          = "\x67"
	SERVER_SET_STOPSIZE        = "\x68"
	SERVER_SET_CONTROL         = "\x69"
	SERVER_NOTIFY_LINESTATE    = "\x6a"
	SERVER_NOTIFY_MODEMSTATE   = "\x6b"
	SERVER_FLOWCONTROL_SUSPEND = "\x6c"
	SERVER_FLOWCONTROL_RESUME  = "\x6d"
	SERVER_SET_LINESTATE_MASK  = "\x6e"
	SERVER_SET_MODEMSTATE_MASK = "\x6f"
	SERVER_PURGE_DATA          = "\x70"
)
View Source
const (
	MNormal = iota
	IACSeen
	MNegotiate
)

Variables

This section is empty.

Functions

func NewSubNegotiation

func NewSubNegotiation(name, option, ack_option string) subNegotiation

func NewTelnetOption

func NewTelnetOption(name string, option byte, send_yes byte, send_no byte, ack_yes, ack_no byte, initial_state string, activation_callback func()) telnetOption

Types

type Streamer

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

func NewStreamer

func NewStreamer(host string, port int, credentials credentials.Credentials, opts ...StreamerOption) *Streamer

func (*Streamer) Close

func (m *Streamer) Close()

func (*Streamer) Cmd

func (*Streamer) Download

func (m *Streamer) Download(paths []string, recurse bool) (map[string]streamer.File, error)

func (*Streamer) GetCredentials

func (m *Streamer) GetCredentials() credentials.Credentials

func (Streamer) HasFeature

func (m Streamer) HasFeature(feature streamer.Const) bool

func (*Streamer) Init

func (m *Streamer) Init(ctx context.Context) error

func (*Streamer) InitAgentForward

func (m *Streamer) InitAgentForward() error

func (*Streamer) Read

func (m *Streamer) Read(context.Context, int) ([]byte, error)

func (*Streamer) ReadTo

func (m *Streamer) ReadTo(ctx context.Context, expr expr.Expr) (streamer.ReadRes, error)

func (*Streamer) SetCredentialsInterceptor

func (m *Streamer) SetCredentialsInterceptor(inter func(credentials.Credentials) credentials.Credentials)

func (*Streamer) SetReadTimeout

func (m *Streamer) SetReadTimeout(duration time.Duration) time.Duration

func (*Streamer) SetTrace

func (m *Streamer) SetTrace(cb trace.CB)

func (*Streamer) Upload

func (m *Streamer) Upload(m2 map[string]streamer.File) error

func (*Streamer) Write

func (m *Streamer) Write(text []byte) error

type StreamerOption

type StreamerOption func(*Streamer)

func WithLogger

func WithLogger(log *zap.Logger) StreamerOption

func WithTrace

func WithTrace(trace trace.CB) StreamerOption

Jump to

Keyboard shortcuts

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