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

Method Handle

znet/server_test.go:183–189  ·  view source on GitHub ↗
(req ziface.IRequest)

Source from the content-addressed store, hash-verified

181}
182
183func (br *CloseConnectionBeforeSendMsgRouter) Handle(req ziface.IRequest) {
184 connection := req.GetConnection()
185 msg := "Zinx server response message for CloseConnectionBeforeSendMsgRouter"
186 connection.Stop()
187 _ = connection.SendMsg(1, []byte(msg))
188 fmt.Println("send: ", msg)
189}
190
191func TestCloseConnectionBeforeSendMsg(t *testing.T) {
192 s := NewServer()

Callers

nothing calls this directly

Calls 3

GetConnectionMethod · 0.65
StopMethod · 0.65
SendMsgMethod · 0.65

Tested by

no test coverage detected