断线
连接关闭就意味着这条流结束了。没有续连:重新调用 connect 即开始一条新流。你的客户端手上已经有收到的文本,服务端从未保存过。
连接关闭就意味着这条流结束了。没有续连:重新调用 connect 即开始一条新流。你的客户端手上已经有收到的文本,服务端从未保存过。
ws.onclose = async (e) => { if (![4001, 4004, 4010, 4011, 1012, 1013].includes(e.code)) return report(e);
// 没有续连。重连就是一条新流。 const { url, sessionId, token } = await connect(); openStream(url, sessionId, token);};