v11.io

v11 输出输出层抽象类

class melobot.protocols.onebot.v11.io.BaseIOSource[源代码]

基类:AbstractIOSource[InPacket, OutPacket, EchoPacket]

变量:

cd_time (float) -- 发送行为操作的冷却时间(防风控)

v11 输出输出层实现类

class melobot.protocols.onebot.v11.io.WSClient[源代码]

基类:InstCounter, GenericIOLayer, WSClientImpl, BaseIOSource

__init__(url: str, max_retry: int = -1, retry_delay: float = 4.0, cd_time: float = 0, access_token: str | None = None, rproxy: RProxyWSClient | RProxyWSServer | None = None, *, name: str | None = None) None[源代码]
参数:
返回类型:

None

class melobot.protocols.onebot.v11.io.WSServer[源代码]

基类:InstCounter, GenericIOLayer, WSServerImpl, BaseIOSource

__init__(host: str, port: int, cd_time: float = 0, access_token: str | None = None, rproxy: RProxyWSClient | RProxyWSServer | None = None, *, name: str | None = None) None[源代码]
参数:
返回类型:

None

class melobot.protocols.onebot.v11.io.HTTPDuplex[源代码]

基类:InstCounter, BaseIOSource

__init__(onebot_url: str, serve_host: str, serve_port: int, secret: str | None = None, access_token: str | None = None, cd_time: float = 0, *, name: str | None = None) None[源代码]
参数:
  • onebot_url (str)

  • serve_host (str)

  • serve_port (int)

  • secret (str | None)

  • access_token (str | None)

  • cd_time (float)

  • name (str | None)

返回类型:

None

class melobot.protocols.onebot.v11.io.RProxyWSClient[源代码]

基类:InstCounter, GenericRProxyLayer, WSClientImpl

__init__(url: str, max_retry: int = -1, retry_delay: float = 4.0, access_token: str | None = None, *, name: str | None = None) None[源代码]
参数:
  • url (str)

  • max_retry (int)

  • retry_delay (float)

  • access_token (str | None)

  • name (str | None)

返回类型:

None

class melobot.protocols.onebot.v11.io.RProxyWSServer[源代码]

基类:InstCounter, GenericRProxyLayer, WSServerImpl

__init__(host: str, port: int, access_token: str | None = None, *, name: str | None = None) None[源代码]
参数:
  • host (str)

  • port (int)

  • access_token (str | None)

  • name (str | None)

返回类型:

None