新增:zconn.appendTo 方法,调整代码风格

git-svn-id: svn://47.119.165.148/zhub@65 e63fbceb-bcc3-4977-ac22-735b83d8d0f4
This commit is contained in:
lxy
2021-01-10 18:02:12 +00:00
parent 01ced95223
commit 320a94af2d
4 changed files with 51 additions and 52 deletions

View File

@@ -71,6 +71,9 @@ func (c *Client) reconn() (err error) {
for topic, _ := range c.subFun {
c.subscribes(topic)
}
for topic, _ := range c.timerFun {
c.timer(topic)
}
break
}
}
@@ -146,6 +149,11 @@ func (c *Client) Timer(topic string, expr string, fun func()) {
c.send("timer", topic, expr)
}
// todo: save client timers info
func (c *Client) timer(topic string) {
c.send("timer", topic)
}
/*
// subscribe topic
---