yukixz / cqsocketapi Goto Github PK
View Code? Open in Web Editor NEWCoolQ Socket API written in VC++.
CoolQ Socket API written in VC++.
使用CQA on Docker,在酷Q插件页面启用了相应的插件,但执行curl 127.0.0.1:11235
时该端口拒绝连线。
RT
除了最基础的消息收发之外,对加好友消息,群员管理这方面的酷q功能支持如何?
没有在readme中看到相关方面的资料,有点小疑问
发送讨论组消息是,酷q会识别成群消息而不是讨论组消息,接收没有问题
python+socketapi使用CoolQ的想法非常不错,对于喜欢开源的朋友真是太好了!
能否写一个readme,这样可以快速上手使用CoolQ,而不用把时间放在CoolQ的配置上
方便的话,如果可以建一个群就更好了,大家有问题可以在群里交流!CoolQ的稳定性非常好,加上pyhton的快速开发,这个项目实用性还是非常强的! CQBot这个demo项目使用了python3.5,表示还在用python2.7!
sscanf_s(payload, "%d %[^\n]", &id, text, sizeof(text));
这句中%d会使所有向服务器发送的消息无法被成功解读,经测试改为%I64D后可修复
coolq现在支持撤回了,我本来准备更新一下这个cqsocketapi,然后发现问题重重
1 好友请求需要直接返回接受或者拒绝或者忽略,但是udp很难完成返回这个操作,需要大量修改
2 发送消息返回消息ID,没法返回给bot,这个倒是还好,封装一次能解决
其他的问题还没看到,但是这第一个问题卡住了,让我觉得可能http api能够更出色完成对接工作
所以我可能也不打算接着开发这个和cqsdk.py了。。。抱歉
新版的酷Q udp客户端好像没法接受消息,能否改成tcp?
我在Ubuntu上部署了官方docker下的wine+酷Q,遇见了极其奇葩的问题
刚刚看到需要framework 2.0,正在做额外的测试。
似乎该项目被废弃?
根据readme 用go写了个client, 可以发送消息,可是接不到消息。
// udp_client project main.go
package main
import (
"fmt"
"net"
//"strconv"
//"encoding/base64"
"strings"
"time"
)
func main() {
begin:
s, e := net.DialUDP("udp4",
&net.UDPAddr{
IP: net.IPv4(127, 0, 0, 1),
Port: 11236,
},
&net.UDPAddr{
IP: net.IPv4(127, 0, 0, 1),
Port: 11235,
})
if e != nil {
fmt.Println(e)
goto begin
}
fmt.Println("success connect to local upd 11253 ")
fmt.Println("localAddr:", s.LocalAddr().String())
lPort := strings.Split(s.LocalAddr().String(), ":")[1]
fmt.Println(lPort)
// send routine
go func() {
for {
n, e := s.Write([]byte("ClientHello " + lPort))
if e != nil {
fmt.Println(e)
}
fmt.Println("write ", n, "message to", s.RemoteAddr().String())
time.Sleep(time.Second * 20)
}
}()
go func() {
for {
time.Sleep(time.Second * 5)
n, e := s.Write([]byte(`PrivateMessage 379667034 dGVzdCCy4srU`))
//n, e := s.Write([]byte(`PrivateMessage 379667034 dGVzdCDmtYvor5U=`))
if e != nil {
fmt.Println(e)
}
fmt.Println("write ", n, "message to", s.RemoteAddr().String())
//time.Sleep(time.Second * 5)
}
}()
// 接收routine
go func() {
for {
fmt.Println("wait for message from server...")
buf := make([]byte, 8)
n, _ := s.Read(buf)
fmt.Println("receive", n, "bytes message\n the message is:", string(buf))
}
}()
//wait routine
for {
time.Sleep(time.Second * 3)
}
}
放在服务器持续运行几天后,一般一周内经常会出现莫名奇妙的图片发送失败,提示不是有效的图片,然后一定要重启酷q后才能运行正常。所以不知道是插件问题还是酷q本身的问题
See test case in vjudge1/qq-tg-irc#2.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.