rfb

package
v0.0.0-...-f5fb732 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

rfb.go

Index

Constants

View Source
const (
	RFB003003 = "RFB 003.003\n"
	RFB003007 = "RFB 003.007\n"
	RFB003008 = "RFB 003.008\n"
)

ProtocolVersion

View Source
const (
	SEC_INVALID uint8 = 0
	SEC_NONE    uint8 = 1
	SEC_VNC     uint8 = 2
)

SecurityType

Variables

This section is empty.

Functions

This section is empty.

Types

type BitRect

type BitRect struct {
	Rects []Rectangles
	Pf    *PixelFormat
}

type ClientCutText

type ClientCutText struct {
	Padding  uint16 `struc:"little"`
	Padding1 uint8  `struc:"little"`
	Size     uint32 `struc:"little"`
	Message  string `struc:"little"`
}

type FrameBufferUpdateRequest

type FrameBufferUpdateRequest struct {
	Incremental uint8
	X           uint16
	Y           uint16
	Width       uint16
	Height      uint16
}

type KeyEvent

type KeyEvent struct {
	DownFlag uint8  `struc:"little"`
	Padding  uint16 `struc:"little"`
	Key      uint32 `struc:"little"`
}

type PixelFormat

type PixelFormat struct {
	BitsPerPixel  uint8  `struc:"little"`
	Depth         uint8  `struc:"little"`
	BigEndianFlag uint8  `struc:"little"`
	TrueColorFlag uint8  `struc:"little"`
	RedMax        uint16 `struc:"little"`
	GreenMax      uint16 `struc:"little"`
	BlueMax       uint16 `struc:"little"`
	RedShift      uint8  `struc:"little"`
	GreenShift    uint8  `struc:"little"`
	BlueShift     uint8  `struc:"little"`
	Padding       uint16 `struc:"little"`
	Padding1      uint8  `struc:"little"`
}

func NewPixelFormat

func NewPixelFormat() *PixelFormat

func ReadPixelFormat

func ReadPixelFormat(r io.Reader) *PixelFormat

type PointerEvent

type PointerEvent struct {
	Mask uint8  `struc:"little"`
	XPos uint16 `struc:"little"`
	YPos uint16 `struc:"little"`
}

type RFB

type RFB struct {
	core.Transport
	Version       string
	SecurityLevel uint8
	ServerName    string
	PixelFormat   *PixelFormat
	NbRect        int
	CurrentRect   *Rectangle
	Password      string
}

func NewRFB

func NewRFB(t core.Transport) *RFB

func (*RFB) SendClientCutText

func (fb *RFB) SendClientCutText(t *ClientCutText)

func (*RFB) SendKeyEvent

func (fb *RFB) SendKeyEvent(k *KeyEvent)

func (*RFB) SendPointEvent

func (fb *RFB) SendPointEvent(p *PointerEvent)

type RFBConn

type RFBConn struct {
	emission.Emitter
	// The Socket connection to the client
	Conn net.Conn

	NbRect  uint16
	BitRect *BitRect
	// contains filtered or unexported fields
}

func NewRFBConn

func NewRFBConn(s net.Conn) *RFBConn

func (*RFBConn) Close

func (fc *RFBConn) Close() error

func (*RFBConn) Read

func (fc *RFBConn) Read(b []byte) (n int, err error)

func (*RFBConn) Write

func (fc *RFBConn) Write(data []byte) (n int, err error)

type Rectangle

type Rectangle struct {
	X        uint16 `struc:"little"`
	Y        uint16 `struc:"little"`
	Width    uint16 `struc:"little"`
	Height   uint16 `struc:"little"`
	Encoding uint32 `struc:"little"`
}

type Rectangles

type Rectangles struct {
	Rect *Rectangle
	Data []byte
}

type ServerCutTextHeader

type ServerCutTextHeader struct {
	Padding [3]byte `struc:"little"`
	Size    uint32  `struc:"little"`
}

type ServerInit

type ServerInit struct {
	Width       uint16       `struc:"little"`
	Height      uint16       `struc:"little"`
	PixelFormat *PixelFormat `struc:"little"`
}

Jump to

Keyboard shortcuts

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