MCPcopy
hub / github.com/aceld/zinx / DoClientConnectedLost

Function DoClientConnectedLost

examples/zinx_client/main.go:47–59  ·  view source on GitHub ↗

Function to execute when the connection is lost (连接断开的时候执行)

(conn ziface.IConnection)

Source from the content-addressed store, hash-verified

45
46// Function to execute when the connection is lost (连接断开的时候执行)
47func 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
61func main() {
62 // Create a client handle using Zinx's Method (创建一个Client句柄,使用Zinx的方法)

Callers

nothing calls this directly

Calls 2

DebugFunction · 0.92
GetPropertyMethod · 0.65

Tested by

no test coverage detected