nvt

package
v0.0.0-...-fdd8d4b Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2019 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CR = '\r'
	LF = '\n'
)

ASCII Control Characters

Variables

View Source
var (
	CRLF = []byte{CR, LF}
)

Predefined Values

Functions

This section is empty.

Types

type Encoding

type Encoding encoding.Encoding

Encoding is the enum type of supported encoding charset. All enum values start with 'Encoding', e.g. TermEncodingUTF8.

var (
	// EncodingUTF8 is the default encoding for all modern language,
	// which processes no encoding/decoding actions on raw data.
	EncodingUTF8 Encoding
	// EncodingGB18030 provides the support of the out-dated Simplified Chinese charset
	EncodingGB18030 Encoding = simplifiedchinese.GB18030
	// EncodingGBK provides the support of the modern Chinese charset
	EncodingGBK Encoding = simplifiedchinese.GBK
	// EncodingBig5 provides the support of the out-dated Traditional Chinese charset
	EncodingBig5 Encoding = traditionalchinese.Big5
)

type Terminal

type Terminal struct {
	Encoding Encoding
	// contains filtered or unexported fields
}

Terminal is where the telnet process runs

func NewTerminal

func NewTerminal(encoding Encoding) *Terminal

NewTerminal creates a telnet terminal with specified encoding charset

func (*Terminal) Start

func (t *Terminal) Start(rootCtx context.Context, r *stream.Reader, w *stream.Writer, chErr chan TerminalError)

Start the terminal session

func (*Terminal) Stopped

func (t *Terminal) Stopped() <-chan struct{}

Stopped returns a channel that emits value only when this terminal has stopped running

type TerminalError

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

TerminalError is an error reported by terminal

func (TerminalError) Error

func (te TerminalError) Error() string

func (TerminalError) Panic

func (te TerminalError) Panic() bool

func (TerminalError) RawErr

func (te TerminalError) RawErr() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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