fix: 按 K-00 约定修复 JS SDK 断线重交与退避
This commit is contained in:
@@ -6,7 +6,7 @@ const pass = process.env.NIXMSG_PASSWORD || "secret";
|
||||
const peer = process.env.NIXMSG_PEER || "device-2";
|
||||
|
||||
const c = new Client();
|
||||
c.onSessionHandler((tok) => console.log("session", tok));
|
||||
c.onSessionHandler((tok) => console.log("session", String(tok).slice(0, 8)));
|
||||
c.onMessageHandler((msg) => console.log("msg", msg.from, msg.body.data));
|
||||
c.onConnectionHandler((ev) => console.log("conn", ev.state, ev.reason));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user