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

Interface IRouter

ziface/irouter.go:12–16  ·  view source on GitHub ↗

IRouter is the interface for message routing. The route is the processing business method set by the framework user for this connection. The IRequest in the route includes the connection information and the request data information for this connection. (路由接口, 这里面路由是 使用框架者给该连接自定的 处理业务方法 路由里的IRequest

Source from the content-addressed store, hash-verified

10// (路由接口, 这里面路由是 使用框架者给该连接自定的 处理业务方法
11// 路由里的IRequest 则包含用该连接的连接信息和该连接的请求数据信息)
12type IRouter interface {
13 PreHandle(request IRequest) //Hook method before processing conn business(在处理conn业务之前的钩子方法)
14 Handle(request IRequest) //Method for processing conn business(处理conn业务的方法)
15 PostHandle(request IRequest) //Hook method after processing conn business(处理conn业务之后的钩子方法)
16}
17
18// RouterHandler is a method slice collection style router. Unlike the old version,
19// the new version only saves the router method collection, and the specific execution

Callers 3

CallMethod · 0.65
CallMethod · 0.65
CallMethod · 0.65

Implementers 9

BaseRouterznet/router.go
PingRouterznet/server_test.go
routerexamples/zinx_routerSlices/router_grou
PingRouterexamples/zinx_closecallback/router/pin
TestRouterexamples/zinx_logger/server/server.go
TestRouterexamples/zinx_new_router/server/server
PingRouterexamples/zinx_version_ex/ZinxV0.4Test/
PingRouterexamples/zinx_version_ex/ZinxV0.3Test/
TestRouterexamples/zinx_kcp/server/server.go

Calls

no outgoing calls

Tested by

no test coverage detected