Comments (14)
- 可以写了 PR。最近忙没时间写这个
- 假定响应为 ServerHello。
ClientHello 除了是一个向 cqsocketapi 注册的机制外,也是一个 keepalive 机制,保证 cqsocketapi
能够合适地移除已经下线的 client。
我对 ServerHello 的理解是:让 client 能够知晓 ClientHello 已被收到。在 server+client
运行在同一设备上的情况下、好像没有什么意义……
On Sunday, 31 July 2016, MrJetChen [email protected] wrote:
RT
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#2, or mute the thread
https://github.com/notifications/unsubscribe-auth/ADLuwblakdkeLTZjcxxyh391dfQXEoeoks5qbGaHgaJpZM4JY_g3
.
Dazzy Ding
Email: [email protected]
from cqsocketapi.
读取配置文件里的端口我已经实现了,ServerHello正在写。(我C++不是很熟练,所以写得比较慢……)
我正在开发一个Minecraft的服务器的插件,用于和CoolQ机器人交互,插件本身应该有检测CoolQ服务器是否在线的功能,所以需要ServerHello。(在Minecraft内调用CoolQ机器人时,不会直接接触到服务器后台,所以无法直接看出CoolQ服务器是否在线)
from cqsocketapi.
👍🏻👍🏻👍🏻
😘
On Tuesday, 2 August 2016, MrJetChen [email protected] wrote:
读取配置文件里的端口我已经实现了,ServerHello正在写。(我C++不是很熟练,所以写得比较慢……)
我正在开发一个Minecraft的服务器的插件,用于和CoolQ机器人交互,插件本身应该有检测CoolQ服务器是否在线的功能,所以需要ServerHello。(在Minecraft内调用CoolQ机器人时,不会直接接触到服务器后台,所以无法直接看出CoolQ服务器是否在线)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#2 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADLuwTpUaAbiTx00WYsjj9rG75pZUJ-Dks5qbyEBgaJpZM4JY_g3
.
Dazzy Ding
Email: [email protected]
from cqsocketapi.
我重新设计了一下协议,但毕竟是新手可能有些逻辑上的问题,希望菊苣帮忙扫一下有没有明显不合理的地方,或者看看有没有什么可以增加的其它功能。
Common表示客户端服务器端双方都可以发送的消息,Client代表客户端,Server代表服务器(即CoolQ),(...)表示后面跟着数据,*前缀表示该数据发出后会在一段时间内等待返回值
- Common //客户端服务器端通用
*Hello //仅客户端发送后服务器返回
Return (...) - Client:
SendPrivateMessage (...)
SendGroupMessage (...)
SendDiscussMessage (...)
*GetNickname
*GetQQ
*GetInfomation (...)
AddFriend (...)
AddGroup (...)
EnableWholeBan (...)
EnableAnonymous (...)
Kick (...)
Leave/LeaveDiscuss/LeaveGroup (...)
Ban/BanAnonymous (...)
SetGroupNickname (...)
SetGroupAdmin (...) - Server:
ReceivePrivateMessage (...)
ReceiveGroupMessage (...)
ReceiveDiscussMessage (...)
EventGroupMemberIncrease (...)
EventGroupMemberDecrease (...)
EventGrouoAdmin (...)
EventFriendAdded (...)
*RequestAddFriend (...)
*RequestAddGroup (...)
PS:APIServer.cpp中第112行的prcsGroupMessage应改为prcsDiscussMessage,我在重写协议的时候发现的。
from cqsocketapi.
话说UDP协议太蛋疼 我想改成TCP协议 自己封装一个消息队列保证消息收发的有序性
from cqsocketapi.
tcp 协议涉及到内容长度写起来好麻烦、而且 tcp 服务器也不如 udp 服务器实现简单……(躺
封装一个消息队列更麻烦了(躺
你有时间写就写吧😂 我不反对
On Tuesday, 2 August 2016, MrJetChen [email protected] wrote:
话说UDP协议太蛋疼 我想改成TCP协议 自己封装一个消息队列保证消息收发的有序性
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#2 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADLuwaHnmQ_Br1dFxxZE8eUja5gOpcZOks5qb1mpgaJpZM4JY_g3
.
Dazzy Ding
Email: [email protected]
from cqsocketapi.
其实给 udp 带上 id 字段就能实现等待响应这种需求的了
On Tuesday, 2 August 2016, Dazzy Ding [email protected] wrote:
tcp 协议涉及到内容长度写起来好麻烦、而且 tcp 服务器也不如 udp 服务器实现简单……(躺
封装一个消息队列更麻烦了(躺
你有时间写就写吧😂 我不反对On Tuesday, 2 August 2016, MrJetChen <[email protected]
javascript:_e(%7B%7D,'cvml','[email protected]');> wrote:话说UDP协议太蛋疼 我想改成TCP协议 自己封装一个消息队列保证消息收发的有序性
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#2 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADLuwaHnmQ_Br1dFxxZE8eUja5gOpcZOks5qb1mpgaJpZM4JY_g3
.Dazzy Ding
Email: [email protected] javascript:_e(%7B%7D,'cvml','[email protected]');
Dazzy Ding
Email: [email protected]
from cqsocketapi.
协议我明天再看看
On Tuesday, 2 August 2016, Dazzy Ding [email protected] wrote:
其实给 udp 带上 id 字段就能实现等待响应这种需求的了
On Tuesday, 2 August 2016, Dazzy Ding <[email protected]
javascript:_e(%7B%7D,'cvml','[email protected]');> wrote:tcp 协议涉及到内容长度写起来好麻烦、而且 tcp 服务器也不如 udp 服务器实现简单……(躺
封装一个消息队列更麻烦了(躺
你有时间写就写吧😂 我不反对On Tuesday, 2 August 2016, MrJetChen [email protected] wrote:
话说UDP协议太蛋疼 我想改成TCP协议 自己封装一个消息队列保证消息收发的有序性
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#2 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADLuwaHnmQ_Br1dFxxZE8eUja5gOpcZOks5qb1mpgaJpZM4JY_g3
.Dazzy Ding
Email: [email protected]Dazzy Ding
Email: [email protected] javascript:_e(%7B%7D,'cvml','[email protected]');
Dazzy Ding
Email: [email protected]
from cqsocketapi.
好的。我刚刚也查了,好像QQ默认用的就是UDP协议。我不打算再改了,就按你说的,稍微封装一下加个id字段。
from cqsocketapi.
已提交Pr
关于配置文件:
路径为app\org.dazzyd.cqsocketapi\config.ini
如果文件不存在或部分配置项缺失能够自动生成
默认内容:
[Server]
SERVER_PORT=11235
CLIENT_SIZE=32
CLIENT_TIMEOUT=300
FRAME_PREFIX_SIZE=256
FRAME_PAYLOAD_SIZE=32768
(我学生党英语能力水平有限,作者大大能否帮忙把相关说明加到README里?
from cqsocketapi.
协议改了的话要重新写文档哈。。
from cqsocketapi.
from cqsocketapi.
冒泡…眼拙看了一眼…
@MrJetChen 在某个提交里把所有buffer创建从stack里移到了heap里然后没清理掉,不会造成很严重的内存泄漏么…
from cqsocketapi.
from cqsocketapi.
Related Issues (13)
- 第一次使用CoolQ,能否写一个readme,方便快速上手 HOT 1
- 不知道是插件问题还是酷q本身的问题 HOT 2
- 新版的酷Q udp客户端好像没法接受消息 HOT 15
- QQ uses GB18030, not GBK HOT 2
- 如何判断Socket API已经部署完成并可用? HOT 4
- 有关新api HOT 1
- 关于在wine中使用本插件的奇怪问题 HOT 9
- 请问这个插件对酷q本身所有功能的适配性如何? HOT 2
- 只能接受本地请求,改成 0.0.0.0 更好 HOT 3
- client 收不到消息 HOT 1
- 存在消息无法解码的问题 HOT 5
- 讨论组消息问题 HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cqsocketapi.