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

Function business

examples/zinx_websocket/client/client.go:23–33  ·  view source on GitHub ↗

客户端自定义业务

(conn ziface.IConnection)

Source from the content-addressed store, hash-verified

21
22// 客户端自定义业务
23func business(conn ziface.IConnection) {
24
25 for {
26 err := conn.SendMsg(1, []byte("ping ping ping ..."))
27 if err != nil {
28 fmt.Println(err)
29
30 }
31 time.Sleep(1 * time.Second)
32 }
33}
34
35// 创建连接的时候执行
36func DoClientConnectedBegin(conn ziface.IConnection) {

Callers 1

DoClientConnectedBeginFunction · 0.70

Calls 1

SendMsgMethod · 0.65

Tested by

no test coverage detected