GithubHelp home page GithubHelp logo

Comments (1)

stdrc avatar stdrc commented on May 21, 2024

当存在其他通信方式时,假设此动作允许在其他动作下调用,应该返回什么事件?

在上一条的前提下,在其他通信方式对一个事件已进行过处理后,例如消息事件已通过调用回复消息动作进行回复,这时如果调用此动作时,是否应该返回被回复的事件?

如果以不同通信方式是相互隔离的假设为前提,这里就是其他通信方式的接收与否、回复与否,都不影响 get_latest_events,我觉得这里可以理解为,这种通信方式不会和其他的通信方式同时使用(比如正向 WS 和反向 WS 也会重复收事件),所以不会有重复收事件的问题,如果用户同时用了这些通信方式,那是 ta 代码写的有问题。

如果这个假设如果能够获得一致的认可的话,可以加到标准里,防止实现出现不一样的行为。

当在 HTTP 通信方式下调用时,获取返回的事件理论上应该从队列或缓存等数据结构中删除,此时如果事件队列或缓存为空,timeout 字段如果不为 0 的时候,是在收到新的事件后立刻返回包含一个事件的结果,还是直到 timeout 的值,返回这阶段内收到的所有事件?

收到立刻返回,因为 timeout 是“等待有事件来”的 timeout,不是“等待拿满 limit 个事件”的 timeout。

from onebot.

Related Issues (20)

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.