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

Function DoClientConnectedBegin

examples/zinx_websocket/client/client.go:36–42  ·  view source on GitHub ↗

创建连接的时候执行

(conn ziface.IConnection)

Source from the content-addressed store, hash-verified

34
35// 创建连接的时候执行
36func DoClientConnectedBegin(conn ziface.IConnection) {
37 //设置两个连接属性,在连接创建之后
38 conn.SetProperty("Name", "刘丹冰")
39 conn.SetProperty("Home", "https://yuque.com/aceld")
40
41 go business(conn)
42}
43
44func wait() {
45 c := make(chan os.Signal, 1)

Callers

nothing calls this directly

Calls 2

businessFunction · 0.70
SetPropertyMethod · 0.65

Tested by

no test coverage detected