APIDispatcher 把 method/body 路由到 nodeapi 内部 do* 方法。
| 27 | |
| 28 | // APIDispatcher 把 method/body 路由到 nodeapi 内部 do* 方法。 |
| 29 | type APIDispatcher struct { |
| 30 | api *nodeapi.API |
| 31 | ipsentinel IPSentinelHandler |
| 32 | |
| 33 | sender Sender // 由 session 在建立连接后通过 SetSender 注入;流式 method 需要它。 |
| 34 | } |
| 35 | |
| 36 | // NewAPIDispatcher 构造一个 dispatcher。ipsentinel 可为 nil, |
| 37 | // 此时所有 IPSentinel* method 会返回错误。 |
nothing calls this directly
no outgoing calls
no test coverage detected