Documentation
¶
Index ¶
- Variables
- func New(mo media.Factory, fo files.Factory) application.Factory
- type ClientMessageType
- type CursorRectangle
- type CutText
- type Encoding
- type ExtendedCutText
- type ExtendedCutTextHeader
- type FixColourMapEntries
- type FramebufferUpdate
- type FramebufferUpdateRequest
- type KeyEvent
- type KeySym
- type PixelFormat
- type PointerEvent
- type RGBIntensity
- type Rectangle
- type ServerInit
- type ServerMessageType
- type SetEncodings
- type SetPixelFormat
- type XCursorRectangle
- type ZlibRectangle
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnhandledMessage = errors.New(`message not handled`) ErrUnhandledClientMessage = fmt.Errorf(`client %w`, ErrUnhandledMessage) ErrUnhandledServerMessage = fmt.Errorf(`server %w`, ErrUnhandledMessage) ErrUnhandledServerEncoding = fmt.Errorf(`%w due to unknown encoding`, ErrUnhandledServerMessage) ErrNewStreamNotifier = fmt.Errorf("%w: new stream notifier", io.EOF) )
Functions ¶
Types ¶
type ClientMessageType ¶
type ClientMessageType uint8
const ( TypeSetPixelFormat ClientMessageType = 0 TypeFixColourMapEntries ClientMessageType = 1 TypeSetEncodings ClientMessageType = 2 TypeFramebufferUpdateRequest ClientMessageType = 3 TypeKeyEvent ClientMessageType = 4 TypePointerEvent ClientMessageType = 5 TypeClientCutTex ClientMessageType = 6 )
func (ClientMessageType) MarshalJSON ¶
func (t ClientMessageType) MarshalJSON() ([]byte, error)
type CursorRectangle ¶
type CutText ¶
type CutText struct { MessageType ClientMessageType Padding [3]uint8 Length uint32 `tcp:",Text"` Text []uint8 }
type Encoding ¶
type Encoding int32
const ( EncodingRaw Encoding = 0 EncodingCopyRect Encoding = 1 EncodingRRE Encoding = 2 EncodingCoRRE Encoding = 4 EncodingHextile Encoding = 5 EncodingZlib Encoding = 6 EncodingTight Encoding = 7 EncodingZlibHex Encoding = 8 EncodingUltraVNC Encoding = 9 EncodingUltraVNC2 Encoding = 10 EncodingTRLE Encoding = 15 EncodingZRLE Encoding = 16 EncodingXZ Encoding = 18 EncodingXZYW Encoding = 19 EncodingJPEG Encoding = 21 EncodingJRLE Encoding = 22 EncodingZRLE2 Encoding = 24 EncodingZSTD Encoding = 25 EncodingTightZSTD Encoding = 26 EncodingZSTDHex Encoding = 27 EncodingZSTDRLE Encoding = 28 EncodingZSTDYWRLE Encoding = 29 EncodingOpenH264 Encoding = 50 EncodingTightPNG Encoding = -260 PseudoEncodingJPEGQuality10 Encoding = -23 PseudoEncodingJPEGQuality9 Encoding = -24 PseudoEncodingJPEGQuality8 Encoding = -25 PseudoEncodingJPEGQuality7 Encoding = -26 PseudoEncodingJPEGQuality6 Encoding = -27 PseudoEncodingJPEGQuality5 Encoding = -28 PseudoEncodingJPEGQuality4 Encoding = -29 PseudoEncodingJPEGQuality3 Encoding = -20 PseudoEncodingJPEGQuality2 Encoding = -31 PseudoEncodingJPEGQuality1 Encoding = -32 PseudoEncodingDesktopSize Encoding = -223 PseudoEncodingLastRect Encoding = -224 PseudoEncodingTightPointerPosition Encoding = -232 PseudoEncodingCursor Encoding = -239 PseudoEncodingXCursor Encoding = -240 PseudoEncodingCompressionLevel10 Encoding = -247 PseudoEncodingCompressionLevel9 Encoding = -248 PseudoEncodingCompressionLevel8 Encoding = -249 PseudoEncodingCompressionLevel7 Encoding = -250 PseudoEncodingCompressionLevel6 Encoding = -251 PseudoEncodingCompressionLevel5 Encoding = -252 PseudoEncodingCompressionLevel4 Encoding = -253 PseudoEncodingCompressionLevel3 Encoding = -254 PseudoEncodingCompressionLevel2 Encoding = -255 PseudoEncodingCompressionLevel1 Encoding = -256 PseudoEncodingExtendedDesktopSize Encoding = -308 PseudoEncodingCursorWithAlpha Encoding = -314 PseudoEncodingUltraVNCEnableIdleTime Encoding = -32764 PseudoEncodingUltraVNCPseudoSession Encoding = -32765 PseudoEncodingUltraVNCFTProtocolVersion Encoding = -32766 PseudoEncodingUltraVNCEnableKeepAlive Encoding = -32767 PseudoEncodingUltraVNCServerState Encoding = -32768 PseudoEncodingUltraVNCEncodingQueueEnable Encoding = -65525 PseudoEncodingExtendedClipBoard Encoding = -1063131698 )
https://www.iana.org/assignments/rfb/rfb.xml#table-rfb-4 https://github.com/ultravnc/UltraVNC/blob/ee9954b90ab6b52a2332b349d55f6a98af3f7424/rfb/rfbproto.h#L460-L503
func (Encoding) MarshalJSON ¶
type ExtendedCutText ¶
type ExtendedCutText struct { ExtendedCutTextHeader Flags uint32 Text []uint8 }
type ExtendedCutTextHeader ¶
type ExtendedCutTextHeader struct { MessageType ClientMessageType Padding [3]uint8 Length int32 }
type FixColourMapEntries ¶
type FixColourMapEntries struct { MessageType ClientMessageType Padding uint8 FirstColour uint16 NumberOfColours uint16 `tcp:",RGBIntensities"` RGBIntensities []RGBIntensity }
type FramebufferUpdate ¶
type FramebufferUpdate struct { MessageType ServerMessageType Padding uint8 NumberOfRectangles uint16 }
type KeyEvent ¶
type KeyEvent struct { MessageType ClientMessageType DownFlag uint8 Padding [2]uint8 Key KeySym }
type PixelFormat ¶
type PointerEvent ¶
type PointerEvent struct { MessageType ClientMessageType ButtonMask uint8 X uint16 Y uint16 }
type RGBIntensity ¶
type ServerInit ¶
type ServerInit struct { FramebufferWidth uint16 FramebufferHeight uint16 ServerPixelFormat PixelFormat NameLength uint32 `tcp:",Name"` Name string }
type ServerMessageType ¶
type ServerMessageType uint8
const ( TypeFramebufferUpdate ServerMessageType = 0 TypeSetColourMapEntries ServerMessageType = 1 TypeBell ServerMessageType = 2 TypeServerCutText ServerMessageType = 3 )
func (ServerMessageType) MarshalJSON ¶
func (t ServerMessageType) MarshalJSON() ([]byte, error)
type SetEncodings ¶
type SetEncodings struct { MessageType ClientMessageType Padding uint8 NumberOfEncodings uint16 `tcp:",Encodings"` Encodings []Encoding }
type SetPixelFormat ¶
type SetPixelFormat struct { MessageType ClientMessageType Padding [3]uint8 PixelFormat PixelFormat }
type XCursorRectangle ¶
type ZlibRectangle ¶
Click to show internal directories.
Click to hide internal directories.