goim 启动流程
最后更新于:2022-04-02 04:55:51
goim启动流程
![](https://docs.gechiui.com/gc-content/uploads/sites/kancloud/b9f2d52b6c472ff81b6372336124f9f5_547x331.png)
各模块启动细节
![](https://docs.gechiui.com/gc-content/uploads/sites/kancloud/5a5034b574a89f8dc146d3ff83e1d153_928x2327.png)
**token、userId、roomId、seq、subkey的关系:**
~~~
logic 模块 -> Connect()
通过token获取userId、roomId
router 模块 -> Put()
通过userId、serverId、roomId存session
并且通过serverId返回seq
seq 是comet.server 的自增
subkey = userId + seq
~~~
';