fix: 按 K-00 约定修复 Go SDK 断线重交与退避

This commit is contained in:
Nixevol
2026-09-30 16:24:13 +08:00
parent 3749b9bdf1
commit f6f8ccf269
20 changed files with 1544 additions and 324 deletions
+5 -1
View File
@@ -17,7 +17,11 @@ func main() {
c := nixmsg.New()
c.OnSession(func(tok string) {
fmt.Println("session", tok)
if len(tok) > 8 {
fmt.Println("session", tok[:8]+"...")
} else {
fmt.Println("session", tok)
}
})
c.OnMessage(func(msg nixmsg.Message) error {
fmt.Println("msg", msg.From, msg.Body.Data)