Documentation
¶
Index ¶
- func ParseProtoVersion(pv []byte) (uint, uint, error)
- type ClientClientInitHandler
- type ClientMessageHandler
- type ClientSecurityHandler
- type ClientServerInitHandler
- type ClientVersionHandler
- type ServerClientInitHandler
- type ServerMessageHandler
- type ServerSecurityHandler
- type ServerServerInitHandler
- type ServerVersionHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientClientInitHandler ¶
type ClientClientInitHandler struct{}
ClientClientInitHandler vnc握手步骤第三步 1. 根据配置信息判断该vnc会话是否独占, 2. 发送是否独占标识给vnc服务端
type ClientMessageHandler ¶
type ClientMessageHandler struct{}
ClientMessageHandler vnc握手已结束,进入消息交互阶段 启动两个协程处理后续消息逻辑 1. 协程1:通过ClientMessageCh通道获取消息,并把该消息写入到vnc服务端会话中。 2. 协程2:从vnc服务端会话中读取消息类型及消息内容,组装该消息,发消息发送到ServerMessageCh通道中,供其他功能消费 3. 发送编码格式消息SetEncodings到vnc服务端 4. 发送帧数据请求消息FramebufferUpdateRequest到vnc服务端
type ClientSecurityHandler ¶
type ClientSecurityHandler struct{}
ClientSecurityHandler vnc握手步骤第二步 1. 读取vnc服务端支持的安全认证套件数量及类型 2. 匹配vnc服务端与proxy客户端的安全认证套件 3. 进入安全认证套件认证流程 4. 获取认证结果,如果认证失败,获取失败的原因。
type ClientServerInitHandler ¶
type ClientServerInitHandler struct{}
ClientServerInitHandler vnc握手第四步 1. 读取vnc服务端发送的屏幕宽高,像素格式,桌面名称
type ClientVersionHandler ¶
type ClientVersionHandler struct{}
ClientVersionHandler vnc握手第一步 1. 连接到vnc服务端后,读取其支持的rfb协议版本。 2. 解析版本,判断该版本proxy客户端是否支持。 3. 如果支持该版本,则发送支持的版本给vnc服务端
type ServerClientInitHandler ¶
type ServerClientInitHandler struct{}
ServerClientInitHandler vnc握手步骤第三步 读取vnc客户端发送的是否支持共享屏幕标识
type ServerMessageHandler ¶
type ServerMessageHandler struct{}
ServerMessageHandler vnc握手已结束,进入消息交互阶段 启动两个协程, 1. 处理proxy服务端的ServerMessage,在ServerMessageCh通道的消息都转发写入到该会话中. 2. 从会话中读取clientMessages,并判断是否支持该消息,如果支持则转发到ClientMessageCh通道中。如果不支持则关闭该会话并报错。
type ServerSecurityHandler ¶
type ServerSecurityHandler struct{}
ServerSecurityHandler vnc握手步骤第二步 1.发送proxy服务端支持的安全认证套件数量及类型。 2.读取vnc客户端支持的安全认证套件类型,判断是否支持, 3.选择互相支持的安全认证套件进行认证,进入认证逻辑,如果认证成功则进入下一步,认证失败则报错。
type ServerServerInitHandler ¶
type ServerServerInitHandler struct{}
ServerServerInitHandler vnc握手步骤第四步 1. 发送proxy服务端的参数信息,屏幕宽高,像素格式,桌面名称
type ServerVersionHandler ¶
type ServerVersionHandler struct{}
ServerVersionHandler vnc握手步骤第一步。 1. vnc客户端链接到proxy服务端后,proxy服务端发送rfb版本信息。 2. 发送版本信息后,接受vnc客户端返回的版本信息,进行版本匹配。 3. 确定版本信息是相互支持的,如果不支持,则返回错误信息,如果支持则进行下一步。