Versions in this module Expand all Collapse all v0 v0.1.0 Jun 18, 2023 Changes in this version + const PROTO_VERS_3_3 + const PROTO_VERS_3_8 + const PROTO_VERS_UNSUP + const PressKey + const ReleaseKey + func Errorf(format string, a ...interface{}) error + func NewVNCError(desc string) error + func SetSettle(s time.Duration) + func Settle() time.Duration + type Bell struct + func (*Bell) Read(c *ClientConn) (ServerMessage, error) + func (*Bell) Type() messages.ServerMessage + type Buffer struct + func NewBuffer(b []byte) *Buffer + func (b *Buffer) Bytes() []byte + func (b *Buffer) Read(data interface{}) error + func (b *Buffer) Write(data interface{}) error + func (b *Buffer) WriteByte(c byte) error + type ClientAuth interface + Handshake func(*ClientConn) error + SecurityType func() uint8 + type ClientAuthNone struct + func (*ClientAuthNone) Handshake(conn *ClientConn) error + func (*ClientAuthNone) SecurityType() uint8 + type ClientAuthVNC struct + Password string + func (*ClientAuthVNC) SecurityType() uint8 + func (auth *ClientAuthVNC) Handshake(conn *ClientConn) error + type ClientAuthVeNCryptAuth struct + func (auth *ClientAuthVeNCryptAuth) Handshake(c *ClientConn) error + func (auth *ClientAuthVeNCryptAuth) SecurityType() uint8 + type ClientConfig struct + Auth []ClientAuth + Exclusive bool + Logger *log.Logger + Password string + ServerMessageCh chan ServerMessage + ServerMessages []ServerMessage + func NewClientConfig(p string) *ClientConfig + type ClientConn struct + Conn net.Conn + func Connect(ctx context.Context, c net.Conn, cfg *ClientConfig) (*ClientConn, error) + func NewClientConn(c net.Conn, cfg *ClientConfig) *ClientConn + func (c *ClientConn) ClientCutText(text string) error + func (c *ClientConn) Close() error + func (c *ClientConn) DebugMetrics() + func (c *ClientConn) DesktopName() string + func (c *ClientConn) Encodable(enc encodings.Encoding) (Encoding, bool) + func (c *ClientConn) Encodings() Encodings + func (c *ClientConn) FramebufferHeight() uint16 + func (c *ClientConn) FramebufferUpdateRequest(inc rfbflags.RFBFlag, x, y, w, h uint16) error + func (c *ClientConn) FramebufferWidth() uint16 + func (c *ClientConn) KeyEvent(key keys.Key, down bool) error + func (c *ClientConn) ListenAndHandle() error + func (c *ClientConn) PointerEvent(button buttons.Button, x, y uint16) error + func (c *ClientConn) SetEncodings(encs Encodings) error + func (c *ClientConn) SetPixelFormat(pf PixelFormat) error + type ClientCutTextMessage struct + Length uint32 + Msg messages.ClientMessage + type Color struct + B uint16 + G uint16 + R uint16 + func NewColor(pf *PixelFormat, cm *ColorMap) *Color + func (c *Color) Marshal() ([]byte, error) + func (c *Color) Unmarshal(data []byte) error + type ColorMap [256]Color + type DesktopSizePseudoEncoding struct + func (*DesktopSizePseudoEncoding) Read(c *ClientConn, rect *Rectangle) (Encoding, error) + func (*DesktopSizePseudoEncoding) Type() encodings.Encoding + func (e *DesktopSizePseudoEncoding) Marshal() ([]byte, error) + func (e *DesktopSizePseudoEncoding) String() string + type EncodableFunc func(enc encodings.Encoding) (Encoding, bool) + type Encoding interface + Read func(*ClientConn, *Rectangle) (Encoding, error) + Type func() encodings.Encoding + type Encodings []Encoding + func (e Encodings) Marshal() ([]byte, error) + type FramebufferUpdate struct + NumRect uint16 + Rects []Rectangle + func (m *FramebufferUpdate) Marshal() ([]byte, error) + func (m *FramebufferUpdate) Read(c *ClientConn) (ServerMessage, error) + func (m *FramebufferUpdate) Type() messages.ServerMessage + func (m *FramebufferUpdate) Unmarshal(_ []byte) error + type FramebufferUpdateRequestMessage struct + Height uint16 + Inc rfbflags.RFBFlag + Msg messages.ClientMessage + Width uint16 + X uint16 + Y uint16 + type KeyEventMessage struct + DownFlag rfbflags.RFBFlag + Key keys.Key + Msg messages.ClientMessage + type Marshaler interface + Marshal func() ([]byte, error) + type MarshalerUnmarshaler interface + type PixelFormat struct + BPP uint8 + BigEndian rfbflags.RFBFlag + BlueMax uint16 + BlueShift uint8 + Depth uint8 + GreenMax uint16 + GreenShift uint8 + RedMax uint16 + RedShift uint8 + TrueColor rfbflags.RFBFlag + var PixelFormat16bit PixelFormat = NewPixelFormat(16) + var PixelFormat32bit PixelFormat = NewPixelFormat(32) + var PixelFormat8bit PixelFormat = NewPixelFormat(8) + func NewPixelFormat(bpp uint8) PixelFormat + func (pf *PixelFormat) Read(r io.Reader) error + func (pf *PixelFormat) Unmarshal(data []byte) error + func (pf PixelFormat) Marshal() ([]byte, error) + func (pf PixelFormat) String() string + type PointerEventMessage struct + Mask uint8 + Msg messages.ClientMessage + X uint16 + Y uint16 + type RawEncoding struct + Colors []Color + func (*RawEncoding) Read(c *ClientConn, rect *Rectangle) (Encoding, error) + func (*RawEncoding) String() string + func (*RawEncoding) Type() encodings.Encoding + func (e *RawEncoding) Marshal() ([]byte, error) + type ReadProxy struct + func (rp *ReadProxy) Read(p []byte) (n int, err error) + type Rectangle struct + Enc Encoding + Height uint16 + Width uint16 + X uint16 + Y uint16 + func NewRectangle(fn EncodableFunc) *Rectangle + func (r *Rectangle) Area() int + func (r *Rectangle) Marshal() ([]byte, error) + func (r *Rectangle) Read(c *ClientConn) error + func (r *Rectangle) String() string + func (r *Rectangle) Unmarshal(data []byte) error + type ServerCutText struct + Text string + func (*ServerCutText) Read(c *ClientConn) (ServerMessage, error) + func (*ServerCutText) Type() messages.ServerMessage + type ServerInit struct + FBHeight uint16 + FBWidth uint16 + NameLength uint32 + PixelFormat PixelFormat + func (m *ServerInit) Read(r io.Reader) error + func (m *ServerInit) Unmarshal(data []byte) error + type ServerMessage interface + Read func(*ClientConn) (ServerMessage, error) + Type func() messages.ServerMessage + type SetColorMapEntries struct + Colors []Color + FirstColor uint16 + func (*SetColorMapEntries) Read(c *ClientConn) (ServerMessage, error) + func (*SetColorMapEntries) Type() messages.ServerMessage + type SetEncodingsMessage struct + Msg messages.ClientMessage + NumEncs uint16 + type SetPixelFormatMessage struct + Msg messages.ClientMessage + PF PixelFormat + type Unmarshaler interface + Unmarshal func(data []byte) error + type VNCError struct + func (e VNCError) Error() string