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

Method Reset

znet/request.go:90–98  ·  view source on GitHub ↗
(conn ziface.IConnection, msg ziface.IMessage)

Source from the content-addressed store, hash-verified

88}
89
90func (r *Request) Reset(conn ziface.IConnection, msg ziface.IMessage) {
91 r.steps = PRE_HANDLE
92 r.conn = conn
93 r.msg = msg
94 r.needNext = true
95 r.index = -1
96 r.keys = nil
97
98}
99
100// Copy 在执行路由函数的时候可能会出现需要再起一个协程的需求,但是 Request 对象由对象池管理后无法保证新协程中的 Request 参数一致
101// 通过 Copy 方法复制一份 Request 对象保持创建协程时候的参数一致。但新开的协程不应该在对原始的执行过程有影响,所以不包含连接和路由对象。

Callers 7

OutPutMethod · 0.45
ListenTcpConnMethod · 0.45
ListenWebsocketConnMethod · 0.45
ListenKcpConnMethod · 0.45
GetRequestFunction · 0.45
teardownFunction · 0.45
TestDelayFunction · 0.45

Calls

no outgoing calls

Tested by 2

teardownFunction · 0.36
TestDelayFunction · 0.36