Function to execute when the connection is lost (连接断开的时候执行)
(conn ziface.IConnection)
| 45 | |
| 46 | // Function to execute when the connection is lost (连接断开的时候执行) |
| 47 | func DoClientConnectedLost(conn ziface.IConnection) { |
| 48 | // Get the Name and Home properties of the connection before it is destroyed |
| 49 | // (在连接销毁之前,查询conn的Name,Home属性) |
| 50 | if name, err := conn.GetProperty("Name"); err == nil { |
| 51 | zlog.Debug("Conn Property Name = ", name) |
| 52 | } |
| 53 | |
| 54 | if home, err := conn.GetProperty("Home"); err == nil { |
| 55 | zlog.Debug("Conn Property Home = ", home) |
| 56 | } |
| 57 | |
| 58 | zlog.Debug("DoClientConnectedLost is Called ... ") |
| 59 | } |
| 60 | |
| 61 | func main() { |
| 62 | // Create a client handle using Zinx's Method (创建一个Client句柄,使用Zinx的方法) |
nothing calls this directly
no test coverage detected