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
| 10 | // (路由接口, 这里面路由是 使用框架者给该连接自定的 处理业务方法 |
| 11 | // 路由里的IRequest 则包含用该连接的连接信息和该连接的请求数据信息) |
| 12 | type 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 |
no outgoing calls
no test coverage detected