关于通讯协议的讨论
#261
Replies: 2 comments 6 replies
-
|
我认为在 KitX 与 KitX Loader 以及 KitX 与 KitX 之间使用 Tcp 通讯没有特别提高开发成本的地方, 以下是在 C# 中使用 Tcp 通讯的示例: var bytes = Encoding.UTF8.GetBytes("content");
client.Send(bytes, 0, bytes.Length); // client is a instance for TcpClient class由于 KitX 已经封装好相关方法, 实际发送内容仅需使用以下代码 (以向插件发送信息为例): var bytes = Encoding.UTF8.GetBytes("content");
Program.WebManager?.pluginsServer?.Send(bytes, target);其中, target 是插件 loader 的 ip 地址, 例如: 127.0.0.1:58523 |
Beta Was this translation helpful? Give feedback.
6 replies
-
|
追更, 在 #278 中, 我们已经将 Dashboard <-> Loader 的通讯协议重写为 WebSocket, 此 Discussion 可以关闭. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
由于目前使用的通讯协议 TCP 有许多不足 (不是说不好而是不够好) , 例如: 过于原始的通讯方式无疑提高了开发成本
现讨论是否有更换或者部分使用不同的协议
在此提出一些想法
如:
更换协议是一个痛苦且长期的过程, 在此仅提供部分设想.
Beta Was this translation helpful? Give feedback.
All reactions