VNC

package
v0.0.0-...-5197d84 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2015 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SetPixelFormat           uint8 = 0
	SetEncodings             uint8 = 2
	FramebufferUpdateRequest uint8 = 3
	KeyEvent                 uint8 = 4
	PointerEvent             uint8 = 5
	SecurityTypeNone         uint8 = 1
)

Variables

View Source
var (
	MessageTypeFramebufferUpdate uint8  = FramebufferUpdateRequest
	EncodingTypeRaw              uint32 = 0
)
View Source
var (
	ChanBufferSize = 1024
	FPS            = 50
)
View Source
var (
	MsgPointerEvent       string = "pe"
	MsgKeyBoardEvent             = "ke"
	MsgFrameUpdateRequest        = "re"
	FullScreen            uint16 = 65535
)

Functions

func CaptureScreenInternal

func CaptureScreenInternal() *image.RGBA

func FillMap

func FillMap(m map[uint32]uint32)

func TestRat

func TestRat()

Types

type Client

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

func (*Client) Read

func (c *Client) Read(value interface{})

func (*Client) ReadBytes

func (c *Client) ReadBytes(count int) (res []byte)

func (*Client) ReadPadding

func (c *Client) ReadPadding(count int)

func (*Client) SendFrameUpdate

func (c *Client) SendFrameUpdate(img []byte)

func (*Client) Write

func (c *Client) Write(value interface{})

func (*Client) WriteBytes

func (c *Client) WriteBytes(data []byte)

func (*Client) WriteString

func (c *Client) WriteString(str string)

type Conn

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

type FrameBufferRequest

type FrameBufferRequest struct {
	Incremental         uint8
	X, Y, Width, Height uint16
}

type FrameUpdateRect

type FrameUpdateRect struct {
	X, Y          uint16
	Width, Height uint16
	EncodingType  uint32
}

type PixelFormat

type PixelFormat struct {
	BitsPerPixel uint8
	Depth        uint8
	BigEndian    uint8
	TrueColor    uint8
	RedMax       uint16
	GreenMax     uint16
	BlueMax      uint16
	RedShift     uint8
	GreenShift   uint8
	BlueShift    uint8
	P1, P2, P3   uint8 // padding bytes
}
var (
	PixelFormatRGBA PixelFormat
)

type VNCClient

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

func NewClient

func NewClient(server net.Conn) *VNCClient

func (*VNCClient) ClientInit

func (c *VNCClient) ClientInit() error

func (*VNCClient) GetFrameUpdate

func (c *VNCClient) GetFrameUpdate() *image.RGBA

func (*VNCClient) Run

func (c *VNCClient) Run()

func (*VNCClient) SendFrameBufferUpdateRequest

func (c *VNCClient) SendFrameBufferUpdateRequest(x, y, width, height uint16)

func (*VNCClient) SendKeyEvent

func (c *VNCClient) SendKeyEvent(keycode uint32, press bool)

func (*VNCClient) SendPointerEvent

func (c *VNCClient) SendPointerEvent(x, y uint16, buttonMask uint8)

func (*VNCClient) SendSetEncodings

func (c *VNCClient) SendSetEncodings()

func (*VNCClient) SendSetPixFormat

func (c *VNCClient) SendSetPixFormat()

type VNCServer

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

func CreateServer

func CreateServer(port string) *VNCServer

func (*VNCServer) Run

func (s *VNCServer) Run()

func (*VNCServer) Stop

func (s *VNCServer) Stop()

type WSProxy

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

func CreateProxy

func CreateProxy(tcpConn net.Conn) *WSProxy

func (*WSProxy) Run

func (p *WSProxy) Run()

Jump to

Keyboard shortcuts

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