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

Method PreHandle

znet/server_test.go:82–88  ·  view source on GitHub ↗

Test PreHandle

(request ziface.IRequest)

Source from the content-addressed store, hash-verified

80
81// Test PreHandle
82func (this *PingRouter) PreHandle(request ziface.IRequest) {
83 fmt.Println("Call Router PreHandle")
84 err := request.GetConnection().SendMsg(1, []byte("before ping ....\n"))
85 if err != nil {
86 fmt.Println("preHandle SendMsg err: ", err)
87 }
88}
89
90// Test Handle
91func (this *PingRouter) Handle(request ziface.IRequest) {

Callers

nothing calls this directly

Calls 2

SendMsgMethod · 0.65
GetConnectionMethod · 0.65

Tested by

no test coverage detected