社区讨论

有关generalsbot

灌水区参与者 1已保存回复 0

讨论操作

快速查看讨论及其快照的属性,并进行相关操作。

当前回复
0 条
当前快照
1 份
快照标识符
@lobe5ifk
此快照首次捕获于
2023/10/29 19:32
2 年前
此快照最后确认于
2023/11/04 01:11
2 年前
查看原帖
官网的代码搞了下来
我按照他的步骤运行了
结果一直不出结果
不说connected也不说disconnected
这到底我的问题还是代码的问题还是服务器的问题
附console.log(socket)的结果
CPP
<ref *1> Socket {
  io: Manager {
    nsps: { '/': [Circular *1] },
    subs: [ [Object], [Object], [Object] ],
    opts: {
      path: '/socket.io',
      hostname: 'bot.generals.io',
      secure: true,
      port: '443'
    },
    _reconnection: true,
    _reconnectionAttempts: Infinity,
    _reconnectionDelay: 1000,
    _reconnectionDelayMax: 5000,
    _randomizationFactor: 0.5,
    backoff: Backoff {
      ms: 1000,
      max: 5000,
      factor: 2,
      jitter: 0.5,
      attempts: 0
    },
    _timeout: 20000,
    readyState: 'opening',
    uri: 'https://bot.generals.io/',
    connecting: [ [Circular *1] ],
    lastPing: null,
    encoding: false,
    packetBuffer: [],
    encoder: Encoder {},
    decoder: Decoder { reconstructor: null },
    autoConnect: true,
    engine: Socket {
      secure: true,
      agent: false,
      hostname: 'bot.generals.io',
      port: '443',
      query: {},
      upgrade: true,
      path: '/socket.io/',
      forceJSONP: false,
      jsonp: true,
      forceBase64: false,
      enablesXDR: false,
      timestampParam: 't',
      timestampRequests: undefined,
      transports: [Array],
      readyState: 'opening',
      writeBuffer: [],
      prevBufferLen: 0,
      policyPort: 843,
      rememberUpgrade: false,
      binaryType: null,
      onlyBinaryUpgrades: undefined,
      perMessageDeflate: [Object],
      pfx: null,
      key: null,
      passphrase: null,
      cert: null,
      ca: null,
      ciphers: null,
      rejectUnauthorized: null,
      forceNode: false,
      id: null,
      upgrades: null,
      pingInterval: null,
      pingTimeout: null,
      pingIntervalTimer: null,
      pingTimeoutTimer: null,
      transport: [XHR],
      _callbacks: [Object]
    },
    skipReconnect: false,
    _callbacks: { '$open': [Array], '$packet': [Array], '$close': [Array] }
  },
  nsp: '/',
  json: [Circular *1],
  ids: 0,
  acks: {},
  receiveBuffer: [],
  sendBuffer: [],
  connected: false,
  disconnected: true,
  subs: [
    { destroy: [Function: destroy] },
    { destroy: [Function: destroy] },
    { destroy: [Function: destroy] }
  ],
  _callbacks: {
    '$connecting': [ [Function: onConnecting] ],
    '$connect': [ [Function (anonymous)] ]
  }
}

回复

0 条回复,欢迎继续交流。

正在加载回复...