Documentation ¶
Index ¶
- Constants
- Variables
- type CanvasSession
- func (that *CanvasSession) Close() error
- func (that *CanvasSession) Conn() io.ReadWriteCloser
- func (that *CanvasSession) Encodings() []rfb.IEncoding
- func (that *CanvasSession) Flush() error
- func (that *CanvasSession) Init(opts ...rfb.Option) error
- func (that *CanvasSession) NewEncoding(typ rfb.EncodingType) rfb.IEncoding
- func (that *CanvasSession) Options() rfb.Options
- func (that *CanvasSession) ProtocolVersion() string
- func (that *CanvasSession) Read(buf []byte) (int, error)
- func (that *CanvasSession) SecurityHandler() rfb.ISecurityHandler
- func (that *CanvasSession) SetColorMap(cm rfb.ColorMap)
- func (that *CanvasSession) SetDesktopName(name []byte)
- func (that *CanvasSession) SetEncodings(encs []rfb.EncodingType) error
- func (that *CanvasSession) SetHeight(height uint16)
- func (that *CanvasSession) SetPixelFormat(pf rfb.PixelFormat)
- func (that *CanvasSession) SetProtocolVersion(pv string)
- func (that *CanvasSession) SetSecurityHandler(_ rfb.ISecurityHandler)
- func (that *CanvasSession) SetWidth(width uint16)
- func (that *CanvasSession) Start()
- func (that *CanvasSession) Swap() *gmap.Map
- func (that *CanvasSession) Type() rfb.SessionType
- func (that *CanvasSession) Wait() <-chan struct{}
- func (that *CanvasSession) Write(buf []byte) (int, error)
- type ClientSession
- func (that *ClientSession) Close() error
- func (that *ClientSession) Conn() io.ReadWriteCloser
- func (that *ClientSession) Encodings() []rfb.IEncoding
- func (that *ClientSession) Flush() error
- func (that *ClientSession) Init(opts ...rfb.Option) error
- func (that *ClientSession) NewEncoding(typ rfb.EncodingType) rfb.IEncoding
- func (that *ClientSession) Options() rfb.Options
- func (that *ClientSession) ProtocolVersion() string
- func (that *ClientSession) Read(buf []byte) (int, error)
- func (that *ClientSession) SecurityHandler() rfb.ISecurityHandler
- func (that *ClientSession) SetColorMap(cm rfb.ColorMap)
- func (that *ClientSession) SetDesktopName(name []byte)
- func (that *ClientSession) SetEncodings(encs []rfb.EncodingType) error
- func (that *ClientSession) SetHeight(height uint16)
- func (that *ClientSession) SetPixelFormat(pf rfb.PixelFormat)
- func (that *ClientSession) SetProtocolVersion(pv string)
- func (that *ClientSession) SetSecurityHandler(securityHandler rfb.ISecurityHandler)
- func (that *ClientSession) SetWidth(width uint16)
- func (that *ClientSession) Start()
- func (that *ClientSession) Swap() *gmap.Map
- func (that *ClientSession) Type() rfb.SessionType
- func (that *ClientSession) Wait() <-chan struct{}
- func (that *ClientSession) Write(buf []byte) (int, error)
- type PlayerSession
- func (that *PlayerSession) Close() error
- func (that *PlayerSession) Conn() io.ReadWriteCloser
- func (that *PlayerSession) Encodings() []rfb.IEncoding
- func (that *PlayerSession) Flush() error
- func (that *PlayerSession) Init(opts ...rfb.Option) error
- func (that *PlayerSession) NewEncoding(typ rfb.EncodingType) rfb.IEncoding
- func (that *PlayerSession) Options() rfb.Options
- func (that *PlayerSession) ProtocolVersion() string
- func (that *PlayerSession) Read(buf []byte) (int, error)
- func (that *PlayerSession) SecurityHandler() rfb.ISecurityHandler
- func (that *PlayerSession) SetColorMap(cm rfb.ColorMap)
- func (that *PlayerSession) SetDesktopName(name []byte)
- func (that *PlayerSession) SetEncodings(_ []rfb.EncodingType) error
- func (that *PlayerSession) SetHeight(height uint16)
- func (that *PlayerSession) SetPixelFormat(pf rfb.PixelFormat)
- func (that *PlayerSession) SetProtocolVersion(pv string)
- func (that *PlayerSession) SetSecurityHandler(_ rfb.ISecurityHandler)
- func (that *PlayerSession) SetWidth(width uint16)
- func (that *PlayerSession) Start()
- func (that *PlayerSession) Swap() *gmap.Map
- func (that *PlayerSession) Type() rfb.SessionType
- func (that *PlayerSession) Wait() <-chan struct{}
- func (that *PlayerSession) Write(buf []byte) (int, error)
- type RecorderSession
- func (that *RecorderSession) Close() error
- func (that *RecorderSession) Conn() io.ReadWriteCloser
- func (that *RecorderSession) Encodings() []rfb.IEncoding
- func (that *RecorderSession) Flush() error
- func (that *RecorderSession) Init(opts ...rfb.Option) error
- func (that *RecorderSession) NewEncoding(typ rfb.EncodingType) rfb.IEncoding
- func (that *RecorderSession) Options() rfb.Options
- func (that *RecorderSession) ProtocolVersion() string
- func (that *RecorderSession) Read(_ []byte) (int, error)
- func (that *RecorderSession) SecurityHandler() rfb.ISecurityHandler
- func (that *RecorderSession) SetColorMap(cm rfb.ColorMap)
- func (that *RecorderSession) SetDesktopName(name []byte)
- func (that *RecorderSession) SetEncodings(_ []rfb.EncodingType) error
- func (that *RecorderSession) SetHeight(height uint16)
- func (that *RecorderSession) SetPixelFormat(pf rfb.PixelFormat)
- func (that *RecorderSession) SetProtocolVersion(pv string)
- func (that *RecorderSession) SetSecurityHandler(_ rfb.ISecurityHandler)
- func (that *RecorderSession) SetWidth(width uint16)
- func (that *RecorderSession) Start()
- func (that *RecorderSession) Swap() *gmap.Map
- func (that *RecorderSession) Type() rfb.SessionType
- func (that *RecorderSession) Wait() <-chan struct{}
- func (that *RecorderSession) Write(buf []byte) (int, error)
- type ServerSession
- func (that *ServerSession) Close() error
- func (that *ServerSession) Conn() io.ReadWriteCloser
- func (that *ServerSession) Encodings() []rfb.IEncoding
- func (that *ServerSession) Flush() error
- func (that *ServerSession) Init(opts ...rfb.Option) error
- func (that *ServerSession) NewEncoding(typ rfb.EncodingType) rfb.IEncoding
- func (that *ServerSession) Options() rfb.Options
- func (that *ServerSession) ProtocolVersion() string
- func (that *ServerSession) Read(buf []byte) (int, error)
- func (that *ServerSession) SecurityHandler() rfb.ISecurityHandler
- func (that *ServerSession) SetColorMap(cm rfb.ColorMap)
- func (that *ServerSession) SetDesktopName(name []byte)
- func (that *ServerSession) SetEncodings(encs []rfb.EncodingType) error
- func (that *ServerSession) SetHeight(height uint16)
- func (that *ServerSession) SetPixelFormat(pf rfb.PixelFormat)
- func (that *ServerSession) SetProtocolVersion(pv string)
- func (that *ServerSession) SetSecurityHandler(securityHandler rfb.ISecurityHandler)
- func (that *ServerSession) SetWidth(width uint16)
- func (that *ServerSession) Start()
- func (that *ServerSession) Swap() *gmap.Map
- func (that *ServerSession) Type() rfb.SessionType
- func (that *ServerSession) Wait() <-chan struct{}
- func (that *ServerSession) Write(buf []byte) (int, error)
Constants ¶
const RBSVersion = "RBS 001.001\n"
Variables ¶
var ( DefaultClientHandlers = []rfb.IHandler{ &handler.ClientVersionHandler{}, &handler.ClientSecurityHandler{}, &handler.ClientClientInitHandler{}, &handler.ClientServerInitHandler{}, &handler.ClientMessageHandler{}, } )
var ( DefaultServerHandlers = []rfb.IHandler{ &handler.ServerVersionHandler{}, &handler.ServerSecurityHandler{}, &handler.ServerClientInitHandler{}, &handler.ServerServerInitHandler{}, &handler.ServerMessageHandler{}, } )
Functions ¶
This section is empty.
Types ¶
type CanvasSession ¶
type CanvasSession struct {
// contains filtered or unexported fields
}
func NewCanvasSession ¶
func NewCanvasSession(opts ...rfb.Option) *CanvasSession
NewCanvasSession 创建客户端会话
func (*CanvasSession) Encodings ¶
func (that *CanvasSession) Encodings() []rfb.IEncoding
Encodings 获取当前支持的编码格式
func (*CanvasSession) Flush ¶
func (that *CanvasSession) Flush() error
func (*CanvasSession) Init ¶ added in v1.1.0
func (that *CanvasSession) Init(opts ...rfb.Option) error
Init 初始化参数
func (*CanvasSession) NewEncoding ¶ added in v1.1.0
func (that *CanvasSession) NewEncoding(typ rfb.EncodingType) rfb.IEncoding
NewEncoding 通过编码类型判断是否支持编码对象
func (*CanvasSession) Options ¶ added in v1.1.0
func (that *CanvasSession) Options() rfb.Options
Options 获取配置信息
func (*CanvasSession) ProtocolVersion ¶
func (that *CanvasSession) ProtocolVersion() string
ProtocolVersion 获取会话使用的协议版本
func (*CanvasSession) SecurityHandler ¶
func (that *CanvasSession) SecurityHandler() rfb.ISecurityHandler
SecurityHandler 返回安全认证处理方法
func (*CanvasSession) SetColorMap ¶
func (that *CanvasSession) SetColorMap(cm rfb.ColorMap)
SetColorMap 设置颜色地图
func (*CanvasSession) SetDesktopName ¶
func (that *CanvasSession) SetDesktopName(name []byte)
SetDesktopName 设置桌面名称
func (*CanvasSession) SetEncodings ¶
func (that *CanvasSession) SetEncodings(encs []rfb.EncodingType) error
SetEncodings 设置编码格式
func (*CanvasSession) SetHeight ¶
func (that *CanvasSession) SetHeight(height uint16)
SetHeight 设置桌面高度
func (*CanvasSession) SetPixelFormat ¶
func (that *CanvasSession) SetPixelFormat(pf rfb.PixelFormat)
SetPixelFormat 设置像素格式
func (*CanvasSession) SetProtocolVersion ¶
func (that *CanvasSession) SetProtocolVersion(pv string)
SetProtocolVersion 设置支持的协议版本
func (*CanvasSession) SetSecurityHandler ¶
func (that *CanvasSession) SetSecurityHandler(_ rfb.ISecurityHandler)
SetSecurityHandler 设置安全认证处理方法
func (*CanvasSession) Start ¶ added in v1.1.0
func (that *CanvasSession) Start()
type ClientSession ¶
type ClientSession struct {
// contains filtered or unexported fields
}
ClientSession proxy 客户端
func (*ClientSession) Encodings ¶
func (that *ClientSession) Encodings() []rfb.IEncoding
Encodings 获取当前支持的编码格式
func (*ClientSession) Flush ¶
func (that *ClientSession) Flush() error
func (*ClientSession) Init ¶ added in v1.1.0
func (that *ClientSession) Init(opts ...rfb.Option) error
Init 初始化参数
func (*ClientSession) NewEncoding ¶ added in v1.1.0
func (that *ClientSession) NewEncoding(typ rfb.EncodingType) rfb.IEncoding
NewEncoding 获取编码对象
func (*ClientSession) Options ¶ added in v1.1.0
func (that *ClientSession) Options() rfb.Options
Options 获取配置信息
func (*ClientSession) ProtocolVersion ¶
func (that *ClientSession) ProtocolVersion() string
ProtocolVersion 获取会话使用的协议版本
func (*ClientSession) SecurityHandler ¶
func (that *ClientSession) SecurityHandler() rfb.ISecurityHandler
SecurityHandler 返回安全认证处理方法
func (*ClientSession) SetColorMap ¶
func (that *ClientSession) SetColorMap(cm rfb.ColorMap)
SetColorMap 设置颜色地图
func (*ClientSession) SetDesktopName ¶
func (that *ClientSession) SetDesktopName(name []byte)
SetDesktopName 设置桌面名称
func (*ClientSession) SetEncodings ¶
func (that *ClientSession) SetEncodings(encs []rfb.EncodingType) error
SetEncodings 设置编码格式
func (*ClientSession) SetHeight ¶
func (that *ClientSession) SetHeight(height uint16)
SetHeight 设置桌面高度
func (*ClientSession) SetPixelFormat ¶
func (that *ClientSession) SetPixelFormat(pf rfb.PixelFormat)
SetPixelFormat 设置像素格式
func (*ClientSession) SetProtocolVersion ¶
func (that *ClientSession) SetProtocolVersion(pv string)
SetProtocolVersion 设置支持的协议版本
func (*ClientSession) SetSecurityHandler ¶
func (that *ClientSession) SetSecurityHandler(securityHandler rfb.ISecurityHandler)
SetSecurityHandler 设置安全认证处理方法
func (*ClientSession) Start ¶ added in v1.1.0
func (that *ClientSession) Start()
type PlayerSession ¶
type PlayerSession struct {
// contains filtered or unexported fields
}
func NewPlayerSession ¶
func NewPlayerSession(opts ...rfb.Option) *PlayerSession
func (*PlayerSession) Encodings ¶
func (that *PlayerSession) Encodings() []rfb.IEncoding
Encodings 获取当前支持的编码格式
func (*PlayerSession) Flush ¶
func (that *PlayerSession) Flush() error
func (*PlayerSession) Init ¶ added in v1.1.0
func (that *PlayerSession) Init(opts ...rfb.Option) error
Init 初始化参数
func (*PlayerSession) NewEncoding ¶ added in v1.1.0
func (that *PlayerSession) NewEncoding(typ rfb.EncodingType) rfb.IEncoding
NewEncoding 通过编码类型判断是否支持编码对象
func (*PlayerSession) Options ¶ added in v1.1.0
func (that *PlayerSession) Options() rfb.Options
Options 获取配置信息
func (*PlayerSession) ProtocolVersion ¶
func (that *PlayerSession) ProtocolVersion() string
ProtocolVersion 获取会话使用的协议版本
func (*PlayerSession) SecurityHandler ¶
func (that *PlayerSession) SecurityHandler() rfb.ISecurityHandler
SecurityHandler 返回安全认证处理方法
func (*PlayerSession) SetColorMap ¶
func (that *PlayerSession) SetColorMap(cm rfb.ColorMap)
SetColorMap 设置颜色地图
func (*PlayerSession) SetDesktopName ¶
func (that *PlayerSession) SetDesktopName(name []byte)
SetDesktopName 设置桌面名称
func (*PlayerSession) SetEncodings ¶
func (that *PlayerSession) SetEncodings(_ []rfb.EncodingType) error
SetEncodings 设置编码格式
func (*PlayerSession) SetHeight ¶
func (that *PlayerSession) SetHeight(height uint16)
SetHeight 设置桌面高度
func (*PlayerSession) SetPixelFormat ¶
func (that *PlayerSession) SetPixelFormat(pf rfb.PixelFormat)
SetPixelFormat 设置像素格式
func (*PlayerSession) SetProtocolVersion ¶
func (that *PlayerSession) SetProtocolVersion(pv string)
SetProtocolVersion 设置支持的协议版本
func (*PlayerSession) SetSecurityHandler ¶
func (that *PlayerSession) SetSecurityHandler(_ rfb.ISecurityHandler)
SetSecurityHandler 设置安全认证处理方法
func (*PlayerSession) Start ¶ added in v1.1.0
func (that *PlayerSession) Start()
func (*PlayerSession) Swap ¶
func (that *PlayerSession) Swap() *gmap.Map
func (*PlayerSession) Type ¶
func (that *PlayerSession) Type() rfb.SessionType
type RecorderSession ¶
type RecorderSession struct {
// contains filtered or unexported fields
}
func (*RecorderSession) Conn ¶
func (that *RecorderSession) Conn() io.ReadWriteCloser
Conn 获取会话底层的网络链接
func (*RecorderSession) Encodings ¶
func (that *RecorderSession) Encodings() []rfb.IEncoding
Encodings 获取当前支持的编码格式
func (*RecorderSession) Flush ¶
func (that *RecorderSession) Flush() error
func (*RecorderSession) Init ¶ added in v1.1.0
func (that *RecorderSession) Init(opts ...rfb.Option) error
Init 初始化参数
func (*RecorderSession) NewEncoding ¶ added in v1.1.0
func (that *RecorderSession) NewEncoding(typ rfb.EncodingType) rfb.IEncoding
NewEncoding 通过编码类型判断是否支持编码对象
func (*RecorderSession) Options ¶ added in v1.1.0
func (that *RecorderSession) Options() rfb.Options
Options 获取配置信息
func (*RecorderSession) ProtocolVersion ¶
func (that *RecorderSession) ProtocolVersion() string
ProtocolVersion 获取会话使用的协议版本
func (*RecorderSession) Read ¶
func (that *RecorderSession) Read(_ []byte) (int, error)
Read 从链接中读取数据
func (*RecorderSession) SecurityHandler ¶
func (that *RecorderSession) SecurityHandler() rfb.ISecurityHandler
SecurityHandler 返回安全认证处理方法
func (*RecorderSession) SetColorMap ¶
func (that *RecorderSession) SetColorMap(cm rfb.ColorMap)
SetColorMap 设置颜色地图
func (*RecorderSession) SetDesktopName ¶
func (that *RecorderSession) SetDesktopName(name []byte)
SetDesktopName 设置桌面名称
func (*RecorderSession) SetEncodings ¶
func (that *RecorderSession) SetEncodings(_ []rfb.EncodingType) error
SetEncodings 设置编码格式
func (*RecorderSession) SetHeight ¶
func (that *RecorderSession) SetHeight(height uint16)
SetHeight 设置桌面高度
func (*RecorderSession) SetPixelFormat ¶
func (that *RecorderSession) SetPixelFormat(pf rfb.PixelFormat)
SetPixelFormat 设置像素格式
func (*RecorderSession) SetProtocolVersion ¶
func (that *RecorderSession) SetProtocolVersion(pv string)
SetProtocolVersion 设置支持的协议版本
func (*RecorderSession) SetSecurityHandler ¶
func (that *RecorderSession) SetSecurityHandler(_ rfb.ISecurityHandler)
SetSecurityHandler 设置安全认证处理方法
func (*RecorderSession) SetWidth ¶
func (that *RecorderSession) SetWidth(width uint16)
SetWidth 设置桌面宽度
func (*RecorderSession) Start ¶ added in v1.1.0
func (that *RecorderSession) Start()
type ServerSession ¶
type ServerSession struct {
// contains filtered or unexported fields
}
func NewServerSession ¶
func NewServerSession(opts ...rfb.Option) *ServerSession
func (*ServerSession) Conn ¶
func (that *ServerSession) Conn() io.ReadWriteCloser
func (*ServerSession) Encodings ¶
func (that *ServerSession) Encodings() []rfb.IEncoding
Encodings 获取当前支持的编码格式
func (*ServerSession) Flush ¶
func (that *ServerSession) Flush() error
func (*ServerSession) Init ¶ added in v1.1.0
func (that *ServerSession) Init(opts ...rfb.Option) error
Init 初始化参数
func (*ServerSession) NewEncoding ¶ added in v1.1.0
func (that *ServerSession) NewEncoding(typ rfb.EncodingType) rfb.IEncoding
NewEncoding 通过编码类型判断是否支持编码对象
func (*ServerSession) Options ¶ added in v1.1.0
func (that *ServerSession) Options() rfb.Options
func (*ServerSession) ProtocolVersion ¶
func (that *ServerSession) ProtocolVersion() string
ProtocolVersion 获取会话使用的协议版本
func (*ServerSession) SecurityHandler ¶
func (that *ServerSession) SecurityHandler() rfb.ISecurityHandler
SecurityHandler 返回安全认证处理方法
func (*ServerSession) SetColorMap ¶
func (that *ServerSession) SetColorMap(cm rfb.ColorMap)
SetColorMap 设置颜色地图
func (*ServerSession) SetDesktopName ¶
func (that *ServerSession) SetDesktopName(name []byte)
SetDesktopName 设置桌面名称
func (*ServerSession) SetEncodings ¶
func (that *ServerSession) SetEncodings(encs []rfb.EncodingType) error
SetEncodings 设置编码格式
func (*ServerSession) SetHeight ¶
func (that *ServerSession) SetHeight(height uint16)
SetHeight 设置桌面高度
func (*ServerSession) SetPixelFormat ¶
func (that *ServerSession) SetPixelFormat(pf rfb.PixelFormat)
SetPixelFormat 设置像素格式
func (*ServerSession) SetProtocolVersion ¶
func (that *ServerSession) SetProtocolVersion(pv string)
SetProtocolVersion 设置支持的协议版本
func (*ServerSession) SetSecurityHandler ¶
func (that *ServerSession) SetSecurityHandler(securityHandler rfb.ISecurityHandler)
SetSecurityHandler 设置安全认证处理方法
func (*ServerSession) Start ¶ added in v1.1.0
func (that *ServerSession) Start()