conn

package
v0.12.3 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Conn connection

func New

func New(cfg *global.Configure) *Conn

New new connection

func (conn *Conn) AddLink(id string)

AddLink attach read message

func (*Conn) ChanClose added in v0.10.0

func (conn *Conn) ChanClose(id string)

ChanClose close read chan

func (*Conn) ChanDisconnect added in v0.10.0

func (conn *Conn) ChanDisconnect() <-chan string

ChanDisconnect get channel of disconnect

func (*Conn) ChanRead

func (conn *Conn) ChanRead(id string) <-chan *network.Msg

ChanRead get read channel from link id

func (*Conn) ChanUnknown

func (conn *Conn) ChanUnknown() <-chan *network.Msg

ChanUnknown get channel of unknown link id

func (*Conn) Requeue added in v0.12.1

func (conn *Conn) Requeue(id string, msg *network.Msg)

Requeue requeue for next read

func (*Conn) SendCodeConnect added in v0.10.0

func (conn *Conn) SendCodeConnect(to, linkID string, requestID uint64,
	uri string, header http.Header) uint64

SendCodeConnect send connect

func (*Conn) SendCodeData added in v0.10.0

func (conn *Conn) SendCodeData(to, linkID string, requestID uint64,
	ok bool, t int, body []byte) uint64

SendCodeData send data

func (*Conn) SendCodeRequest added in v0.10.0

func (conn *Conn) SendCodeRequest(to, linkID string, requestID uint64,
	method, uri string, body []byte, header http.Header) uint64

SendCodeRequest send request

func (*Conn) SendCodeResponseBody added in v0.10.0

func (conn *Conn) SendCodeResponseBody(to, linkID string, requestID uint64,
	idx uint32, ok, done bool, data []byte) uint64

SendCodeResponseBody send response body

func (*Conn) SendCodeResponseConnect added in v0.10.0

func (conn *Conn) SendCodeResponseConnect(to, linkID string, requestID uint64,
	ok bool, msg string, header http.Header) uint64

SendCodeResponseConnect send response connect

func (*Conn) SendCodeResponseHeader added in v0.10.0

func (conn *Conn) SendCodeResponseHeader(to, linkID string, requestID uint64,
	code uint32, header http.Header) uint64

SendCodeResponseHeader send response header

func (*Conn) SendConnectError

func (conn *Conn) SendConnectError(to string, id, info string)

SendConnectError send connect error response message

func (*Conn) SendConnectOK

func (conn *Conn) SendConnectOK(to string, id string)

SendConnectOK send connect success response message

func (*Conn) SendConnectReq

func (conn *Conn) SendConnectReq(id string, cfg global.Rule)

SendConnectReq send connect request message

func (*Conn) SendConnectVnc

func (conn *Conn) SendConnectVnc(id string, cfg global.Rule, quality uint64, showCursor bool)

SendConnectVnc send connect vnc request message

func (*Conn) SendDisconnect

func (conn *Conn) SendDisconnect(to string, id string) uint64

SendDisconnect send disconnect message

func (*Conn) SendKeepalive

func (conn *Conn) SendKeepalive()

SendKeepalive send keepalive message

func (*Conn) SendShellData

func (conn *Conn) SendShellData(to string, id string, data []byte) uint64

SendShellData send shell data

func (*Conn) SendShellResize

func (conn *Conn) SendShellResize(to string, id string, rows, cols uint32)

SendShellResize send shell resize

func (*Conn) SendVNCCADEvent

func (conn *Conn) SendVNCCADEvent(to string, id string)

SendVNCCADEvent send vnc keyboard event

func (*Conn) SendVNCClipboardData

func (conn *Conn) SendVNCClipboardData(to string, id string, set bool, data string)

SendVNCClipboardData send vnc clipboard data

func (*Conn) SendVNCCtrl

func (conn *Conn) SendVNCCtrl(to string, id string, quality uint64, showCursor bool)

SendVNCCtrl send vnc config

func (*Conn) SendVNCImage

func (conn *Conn) SendVNCImage(to string, id string, screen, rect image.Rectangle,
	encode network.VncImageEncoding, data []byte)

SendVNCImage send vnc image data

func (*Conn) SendVNCKeyboard

func (conn *Conn) SendVNCKeyboard(to string, id string,
	status, key string)

SendVNCKeyboard send vnc keyboard event

func (*Conn) SendVNCMouse

func (conn *Conn) SendVNCMouse(to string, id string,
	button, status string, x, y int)

SendVNCMouse send vnc mouse event

func (*Conn) SendVNCScroll

func (conn *Conn) SendVNCScroll(to string, id string, x, y int32)

SendVNCScroll send vnc scroll event

func (*Conn) Wait added in v0.9.1

func (conn *Conn) Wait()

Wait wait for connection closed

Jump to

Keyboard shortcuts

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