LibVncClient获取操作系统信息

时间:2017-12-15 23:22:09

标签: c++ c client vnc rfb-protocol

我使用libvncclient构建一个查看器,在其中我尝试集成一些特定的热键,这些热键执行一些脚本编写,这些热键作为菜单选项完成,例如enable taskmanager,'运行cmd'用于窗口,和'开放终端',更新repos'等我需要检测操作系统信息,但我没有看到任何从rfb proto获取此信息

rfbClient *client = new client();

if(!ConnectToRFBServer(client,client->serverHost,client->serverPort))
      return FALSE;

if (!InitialiseRFBConnection(client))
     return FALSE;

我看了rfbclient.h并且rfbClient结构没有保存任何存储此信息的回调/或字段,并且看起来没有api。但是在rfc中有这个东西https://tools.ietf.org/html/rfc6143#section-7.3.2

收到ClientInit消息后,服务器发送ServerInit    信息。这告诉客户端服务器的宽度和高度    framebuffer,它的像素格式,以及与之关联的名称    桌面:

理查森& Levine信息[第11页]

RFC 6143远程帧缓冲协议2011年3月

  +--------------+--------------+------------------------------+
  | No. of bytes | Type [Value] | Description                  |
  +--------------+--------------+------------------------------+
  | 2            | U16          | framebuffer-width in pixels  |
  | 2            | U16          | framebuffer-height in pixels |
  | 16           | PIXEL_FORMAT | server-pixel-format          |
  | 4            | U32          | name-length                  |
  | name-length  | U8 array     | name-string                  |
  +--------------+--------------+------------------------------+

但似乎libvnc无法解决这个问题,是否有任何方法可以获取此信息?

0 个答案:

没有答案
相关问题