Function to execute when the connection is created (创建连接的时候执行)
(conn ziface.IConnection)
| 34 | |
| 35 | // Function to execute when the connection is created (创建连接的时候执行) |
| 36 | func DoClientConnectedBegin(conn ziface.IConnection) { |
| 37 | zlog.Debug("DoConnectionBegin is Called ... ") |
| 38 | |
| 39 | // Set two connection properties after the connection is created (设置两个连接属性,在连接创建之后) |
| 40 | conn.SetProperty("Name", "刘丹冰Aceld") |
| 41 | conn.SetProperty("Home", "https://yuque.com/aceld") |
| 42 | |
| 43 | go business(conn) |
| 44 | } |
| 45 | |
| 46 | // Function to execute when the connection is lost (连接断开的时候执行) |
| 47 | func DoClientConnectedLost(conn ziface.IConnection) { |
nothing calls this directly
no test coverage detected