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

Function main

examples/zinx_websocket/server/server.go:9–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7)
8
9func main() {
10 // Set up as WebSocket before starting. (在启动之前设置为 websocket)
11 zconf.GlobalObject.Mode = ""
12 zconf.GlobalObject.LogFile = ""
13
14 s := znet.NewServer()
15
16 s.AddRouter(100, &s_router.PingRouter{})
17 s.AddRouter(1, &s_router.HelloZinxRouter{})
18
19 s.Serve()
20}

Callers

nothing calls this directly

Calls 3

AddRouterMethod · 0.95
ServeMethod · 0.95
NewServerFunction · 0.92

Tested by

no test coverage detected