Git Product home page Git Product logo

cqsocketapi's People

Contributors

artoria2e5 avatar bpazy avatar mrjetchen avatar paspy avatar yukixz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cqsocketapi's Issues

存在消息无法解码的问题

sscanf_s(payload, "%d %[^\n]", &id, text, sizeof(text));
这句中%d会使所有向服务器发送的消息无法被成功解读,经测试改为%I64D后可修复

关于在wine中使用本插件的奇怪问题

我在Ubuntu上部署了官方docker下的wine+酷Q,遇见了极其奇葩的问题

  • 宿主机到docker内UDP通信成功,双方都是由我编写的测试程序。
  • docker内启动酷Q和Client,互相通信成功,可以添加客户端和收到ServerHello。
  • 宿主机运行Client,docker内运行酷Q,似乎收不到任何信息

刚刚看到需要framework 2.0,正在做额外的测试。
似乎该项目被废弃?

不知道是插件问题还是酷q本身的问题

放在服务器持续运行几天后,一般一周内经常会出现莫名奇妙的图片发送失败,提示不是有效的图片,然后一定要重启酷q后才能运行正常。所以不知道是插件问题还是酷q本身的问题

有关新api

coolq现在支持撤回了,我本来准备更新一下这个cqsocketapi,然后发现问题重重
1 好友请求需要直接返回接受或者拒绝或者忽略,但是udp很难完成返回这个操作,需要大量修改
2 发送消息返回消息ID,没法返回给bot,这个倒是还好,封装一次能解决

其他的问题还没看到,但是这第一个问题卡住了,让我觉得可能http api能够更出色完成对接工作

所以我可能也不打算接着开发这个和cqsdk.py了。。。抱歉

讨论组消息问题

发送讨论组消息是,酷q会识别成群消息而不是讨论组消息,接收没有问题

client 收不到消息

根据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)
    }

}

第一次使用CoolQ,能否写一个readme,方便快速上手

python+socketapi使用CoolQ的想法非常不错,对于喜欢开源的朋友真是太好了!
能否写一个readme,这样可以快速上手使用CoolQ,而不用把时间放在CoolQ的配置上
方便的话,如果可以建一个群就更好了,大家有问题可以在群里交流!CoolQ的稳定性非常好,加上pyhton的快速开发,这个项目实用性还是非常强的! CQBot这个demo项目使用了python3.5,表示还在用python2.7!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.