Andy Pan

Results 356 comments of Andy Pan

可能是测试结果波动?多测几次也是这样吗?或者试试只设置 `gnet.WithMulticore(true)` 呢?

That is a constructive proposal, I will pay attention to the `DPDK` and go to investigate it after I finish the main jobs of `gnet`, thank you for the proposal.😊

I am closing this issue and I will come back notify you if I decide to add DPDK into `gnet`, thanks~

As @cctse said, `gnet` is a low-level networking framework which provides the most basic functionalities for other frameworks/libraries in application layer, I encourage developers to build application-layer frameworks/libraries on top...

看起来和 #220 是一类问题?看来这种连接建立后首个包特殊处理的场景不少见,可以考虑新增一个 API 支持这类场景。

`gnet.ICodec` 和 handshake 没什么关系,编解码器主要关心的是协议的处理,握手应该是有一个专门的 handler。 我想可能都不需要新加一个 API,直接让用户注册一个 handshake handler,然后收到第一个包的时候调用一下就行。

我理解是不是业务方实现 `gnet.ICodec` 接口的 struct 里设置一个 bool 值,然后在 `codec.Decode()` 里面直接判断一下就行了?如果是第一个包就去调用业务方的 handshake handler 进行握手,这样是不是就可以解决你们的问题了?

gnet 哪个版本?还有为什么要用 goroutine pool? `React()` 直接写不就行了?

你这种用法只用了 `gnet` 的异步任务队列的功能,`gnet` 管理的每一个 socket 要依赖于另外一个 socket 的响应,所以每一个 `gnet` 的 socket 回写数据的时候是先放到异步队列,然后通过系统调用,唤醒 epoll 所在的线程去 `Write` 数据,当然不如用标准库直接 `Write` 了。 `gnet` 不太适合你这种场景。