client

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

client.go

rfb.go

Index

Constants

View Source
const (
	CLIP_OFF = 0
	CLIP_IN  = 0x1
	CLIP_OUT = 0x2
)
View Source
const (
	TC_RDP = 0
	TC_VNC = 1
)

Variables

This section is empty.

Functions

func Bpp

func Bpp(bp uint16) (pixel int)

Types

type Bitmap

type Bitmap struct {
	DestLeft     int    `json:"destLeft"`
	DestTop      int    `json:"destTop"`
	DestRight    int    `json:"destRight"`
	DestBottom   int    `json:"destBottom"`
	Width        int    `json:"width"`
	Height       int    `json:"height"`
	BitsPerPixel int    `json:"bitsPerPixel"`
	IsCompress   bool   `json:"isCompress"`
	Data         []byte `json:"data"`
}

type Client

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

func NewClient

func NewClient(host, user, passwd string, t int, s *Setting) *Client

func (*Client) KeyDown

func (c *Client) KeyDown(sc int, name string)

func (*Client) KeyUp

func (c *Client) KeyUp(sc int, name string)

func (*Client) Login

func (c *Client) Login() error

func (*Client) MouseDown

func (c *Client) MouseDown(button, x, y int)

func (*Client) MouseMove

func (c *Client) MouseMove(x, y int)

func (*Client) MouseUp

func (c *Client) MouseUp(button, x, y int)

func (*Client) MouseWheel

func (c *Client) MouseWheel(scroll, x, y int)

func (*Client) OnBitmap

func (c *Client) OnBitmap(f func([]Bitmap))

func (*Client) OnClose

func (c *Client) OnClose(f func())

func (*Client) OnError

func (c *Client) OnError(f func(e error))

func (*Client) OnReady

func (c *Client) OnReady(f func())

func (*Client) OnSuccess

func (c *Client) OnSuccess(f func())

type Control

type Control interface {
	Login(host, user, passwd string, width, height int) error
	KeyUp(sc int, name string)
	KeyDown(sc int, name string)
	MouseMove(x, y int)
	MouseWheel(scroll, x, y int)
	MouseUp(button int, x, y int)
	MouseDown(button int, x, y int)
	On(event string, msg interface{})
	Close()
}

type RdpClient

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

func (*RdpClient) Close

func (c *RdpClient) Close()

func (*RdpClient) KeyDown

func (c *RdpClient) KeyDown(sc int, name string)

func (*RdpClient) KeyUp

func (c *RdpClient) KeyUp(sc int, name string)

func (*RdpClient) Login

func (c *RdpClient) Login(host, user, pwd string, width, height int) error

func (*RdpClient) MouseDown

func (c *RdpClient) MouseDown(button int, x, y int)

func (*RdpClient) MouseMove

func (c *RdpClient) MouseMove(x, y int)

func (*RdpClient) MouseUp

func (c *RdpClient) MouseUp(button int, x, y int)

func (*RdpClient) MouseWheel

func (c *RdpClient) MouseWheel(scroll, x, y int)

func (*RdpClient) On

func (c *RdpClient) On(event string, f interface{})

type Setting

type Setting struct {
	Width    int
	Height   int
	Protocol string
	LogLevel glog.LEVEL
}

func NewSetting

func NewSetting() *Setting

func (*Setting) SetClipboard

func (s *Setting) SetClipboard(c int)

func (*Setting) SetLogLevel

func (s *Setting) SetLogLevel()

func (*Setting) SetRequestedProtocol

func (s *Setting) SetRequestedProtocol(p uint32)

type VncClient

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

func (*VncClient) Close

func (c *VncClient) Close()

func (*VncClient) KeyDown

func (c *VncClient) KeyDown(sc int, name string)

func (*VncClient) KeyUp

func (c *VncClient) KeyUp(sc int, name string)

func (*VncClient) Login

func (c *VncClient) Login(host, user, pwd string, width, height int) error

func (*VncClient) MouseDown

func (c *VncClient) MouseDown(button int, x, y int)

func (*VncClient) MouseMove

func (c *VncClient) MouseMove(x, y int)

func (*VncClient) MouseUp

func (c *VncClient) MouseUp(button int, x, y int)

func (*VncClient) MouseWheel

func (c *VncClient) MouseWheel(scroll, x, y int)

func (*VncClient) On

func (c *VncClient) On(event string, f interface{})

Jump to

Keyboard shortcuts

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