ws2s

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Rendered for js/wasm

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseConnection

func CloseConnection(id int, onCloseCallback func()) error

func InitLib

func InitLib()

func Log

func Log(format string, args ...interface{})

func NewConnection

func NewConnection(
	ws2sHost string, host string, port int,
	onConnect func(),
	onError func(msg string),
) (int, error)

func ReadConnection

func ReadConnection(id int, onReadCallback func(data []byte, err string)) ([]byte, error)

func WriteConnection

func WriteConnection(id int, data []byte, onWriteCallback func(n int, err string)) (int, error)

Types

type OptionalParams

type OptionalParams struct {
	Host                  string `json:"host,omitempty"`
	Port                  int    `json:"port,omitempty"`
	SSHHost               string `json:"ssh_host,omitempty"`
	SSHPort               int    `json:"ssh_port,omitempty"`
	SSHUsername           string `json:"ssh_username,omitempty"`
	SSHPassword           string `json:"ssh_password,omitempty"`
	SSHPrivateKey         string `json:"ssh_private_key,omitempty"`
	SSHPrivateKeyPassword string `json:"ssh_private_key_password,omitempty"`
}

Jump to

Keyboard shortcuts

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