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

Function DoConnectionBegin

examples/zinx_metrics/server/server.go:10–20  ·  view source on GitHub ↗
(conn ziface.IConnection)

Source from the content-addressed store, hash-verified

8)
9
10func DoConnectionBegin(conn ziface.IConnection) {
11 zlog.Ins().InfoF("DoConnectionBegin is Called ...")
12
13 conn.SetProperty("Name", "Aceld")
14 conn.SetProperty("Home", "https://yuque.com/aceld")
15
16 err := conn.SendMsg(2, []byte("DoConnection BEGIN..."))
17 if err != nil {
18 zlog.Error(err)
19 }
20}
21
22func DoConnectionLost(conn ziface.IConnection) {
23 if name, err := conn.GetProperty("Name"); err == nil {

Callers

nothing calls this directly

Calls 5

InsFunction · 0.92
ErrorFunction · 0.92
InfoFMethod · 0.65
SetPropertyMethod · 0.65
SendMsgMethod · 0.65

Tested by

no test coverage detected