From ab3c7fd47668fa9b616ac46ce558137b67759c73 Mon Sep 17 00:00:00 2001 From: lwch Date: Fri, 29 Oct 2021 18:53:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9msg=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=BB=93=E6=9E=84=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/client/pool/send_vnc.go | 2 +- code/network/msg.pb.go | 36 ++++++++++++++++++++---------------- code/network/msg.proto | 7 ++++--- 3 files changed, 25 insertions(+), 20 deletions(-) diff --git a/code/client/pool/send_vnc.go b/code/client/pool/send_vnc.go index 2eb3dc9..a6dcd12 100644 --- a/code/client/pool/send_vnc.go +++ b/code/client/pool/send_vnc.go @@ -12,7 +12,7 @@ func (conn *Conn) SendVNCImage(to string, toIdx uint32, id string, screen, rect var msg network.Msg msg.To = to msg.ToIdx = toIdx - msg.XType = network.Msg_shell_resize + msg.XType = network.Msg_vnc_image msg.LinkId = id msg.Payload = &network.Msg_Vimg{ Vimg: &network.VncImage{ diff --git a/code/network/msg.pb.go b/code/network/msg.pb.go index 549fa87..c5f82cb 100644 --- a/code/network/msg.pb.go +++ b/code/network/msg.pb.go @@ -35,9 +35,10 @@ const ( Msg_shell_data MsgType = 11 // vnc Msg_vnc_ctrl MsgType = 20 - Msg_vnc_mouse MsgType = 21 - Msg_vnc_keyboard MsgType = 22 - Msg_vnc_cad MsgType = 23 // ctrl+alt+del + Msg_vnc_image MsgType = 21 + Msg_vnc_mouse MsgType = 22 + Msg_vnc_keyboard MsgType = 23 + Msg_vnc_cad MsgType = 24 // ctrl+alt+del ) // Enum value maps for MsgType. @@ -53,9 +54,10 @@ var ( 10: "shell_resize", 11: "shell_data", 20: "vnc_ctrl", - 21: "vnc_mouse", - 22: "vnc_keyboard", - 23: "vnc_cad", + 21: "vnc_image", + 22: "vnc_mouse", + 23: "vnc_keyboard", + 24: "vnc_cad", } MsgType_value = map[string]int32{ "unknown": 0, @@ -68,9 +70,10 @@ var ( "shell_resize": 10, "shell_data": 11, "vnc_ctrl": 20, - "vnc_mouse": 21, - "vnc_keyboard": 22, - "vnc_cad": 23, + "vnc_image": 21, + "vnc_mouse": 22, + "vnc_keyboard": 23, + "vnc_cad": 24, } ) @@ -400,7 +403,7 @@ var file_msg_proto_rawDesc = []byte{ 0x09, 0x76, 0x6e, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x25, 0x0a, 0x11, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x65, 0x6e, - 0x63, 0x22, 0xc2, 0x06, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x26, 0x0a, 0x05, 0x5f, 0x74, 0x79, + 0x63, 0x22, 0xd1, 0x06, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x26, 0x0a, 0x05, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, @@ -438,7 +441,7 @@ var file_msg_proto_rawDesc = []byte{ 0x75, 0x73, 0x65, 0x48, 0x00, 0x52, 0x06, 0x76, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x04, 0x76, 0x6b, 0x62, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x76, 0x6e, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x62, 0x6f, 0x61, - 0x72, 0x64, 0x48, 0x00, 0x52, 0x04, 0x76, 0x6b, 0x62, 0x64, 0x22, 0xce, 0x01, 0x0a, 0x04, 0x74, + 0x72, 0x64, 0x48, 0x00, 0x52, 0x04, 0x76, 0x6b, 0x62, 0x64, 0x22, 0xdd, 0x01, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x10, 0x02, 0x12, 0x0f, @@ -449,11 +452,12 @@ var file_msg_proto_rawDesc = []byte{ 0x0c, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x10, 0x0a, 0x12, 0x0e, 0x0a, 0x0a, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x10, 0x0b, 0x12, 0x0c, 0x0a, 0x08, 0x76, 0x6e, 0x63, 0x5f, 0x63, 0x74, 0x72, 0x6c, 0x10, 0x14, 0x12, 0x0d, 0x0a, - 0x09, 0x76, 0x6e, 0x63, 0x5f, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x10, 0x15, 0x12, 0x10, 0x0a, 0x0c, - 0x76, 0x6e, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x10, 0x16, 0x12, 0x0b, - 0x0a, 0x07, 0x76, 0x6e, 0x63, 0x5f, 0x63, 0x61, 0x64, 0x10, 0x17, 0x42, 0x09, 0x0a, 0x07, 0x70, - 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x0c, 0x5a, 0x0a, 0x2e, 0x2f, 0x3b, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x09, 0x76, 0x6e, 0x63, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x10, 0x15, 0x12, 0x0d, 0x0a, 0x09, + 0x76, 0x6e, 0x63, 0x5f, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x10, 0x16, 0x12, 0x10, 0x0a, 0x0c, 0x76, + 0x6e, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x10, 0x17, 0x12, 0x0b, 0x0a, + 0x07, 0x76, 0x6e, 0x63, 0x5f, 0x63, 0x61, 0x64, 0x10, 0x18, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x0c, 0x5a, 0x0a, 0x2e, 0x2f, 0x3b, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/code/network/msg.proto b/code/network/msg.proto index 2b58926..dd40a9d 100644 --- a/code/network/msg.proto +++ b/code/network/msg.proto @@ -26,9 +26,10 @@ message msg { shell_data = 11; // vnc vnc_ctrl = 20; - vnc_mouse = 21; - vnc_keyboard = 22; - vnc_cad = 23; // ctrl+alt+del + vnc_image = 21; + vnc_mouse = 22; + vnc_keyboard = 23; + vnc_cad = 24; // ctrl+alt+del } type _type = 1; string from = 2;