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

Function DoClientConnectedBegin

examples/zinx_client/main.go:36–44  ·  view source on GitHub ↗

Function to execute when the connection is created (创建连接的时候执行)

(conn ziface.IConnection)

Source from the content-addressed store, hash-verified

34
35// Function to execute when the connection is created (创建连接的时候执行)
36func 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 (连接断开的时候执行)
47func DoClientConnectedLost(conn ziface.IConnection) {

Callers

nothing calls this directly

Calls 3

DebugFunction · 0.92
businessFunction · 0.70
SetPropertyMethod · 0.65

Tested by

no test coverage detected