Andy Pan
Andy Pan
> I see @saghul gave his approval on this a long time ago but I guess that will not suffice to merge this PR. Since @bnoordhuis @vtjnash seemed to have...
Another two weeks have passed, still zero response... Helplessly and despairingly ping @bnoordhuis @vtjnash @saghul @libuv/collaborators
I have to admit that the latest commit has bloated this PR. The original version would be way more concise, maybe we should go back to using a placeholder file...
Hi @vtjnash, do you have a minute to review the latest commit?
这个问题主要是 gnet v1 里出现的,因为 v1 有编码器和解码器的功能,导致解码器在识别第一个特殊包的场景中不是很灵活,但是 gnet v2 移除了编码器和解码器,现在整个数据解析逻辑都要放在 `OnTraffic()` 里了,更加灵活,就没必要再设置一个所谓的 handler 了,用户自己判断一下第一个包然后处理就行了。
不需要每次都判断,你用 `sync.Once` 或者更简单地在 `c.Context` 里设置一个 bool,第一个包解析完之后就设个标志,下次判断一下这个标志,跳过就行了。