limpo1989

Results 18 comments of limpo1989

不要依赖TCP的连接建立来判断连接成功与否,而是通过应用层消息来决定(握手消息+Ping保活消息)来决定连接是否存活,这样不管是TCP还是KCP都可以一视同仁的处理

kcp-csharp currently not supported FEC & Packet level encryption. please disable your golang server FEC & Packet level encryption option

Test OK ![20210502003112](https://user-images.githubusercontent.com/4050314/116788728-dac88200-aadd-11eb-9e92-16b3faa9cf76.png)

参考这个示例,或者提供你的测试代码(另外:TCP断线如果在拔网线的情况下检测不到断线的,具体可以搜索相关文章) https://github.com/go-netty/go-netty-samples/blob/5f8a387c120c1ab311aa2c9a608d459408573f52/tcp_server/main.go#L77-L80

You can modify this example https://github.com/go-netty/go-netty-samples/blob/0dc552fc89978490e2e8fa70d20793944c05bd68/chat_server/main.go#L47

You can look at this example (increment `number` on HandleActive, decrement `number` on HandleActive) https://github.com/go-netty/go-netty-samples/blob/5f8a387c120c1ab311aa2c9a608d459408573f52/chat_server/session_manager.go#L46

你这个看像还没读取到数据,对端就关闭了

最好能提供一个最简单的能复现的例子(我基于[tcp_server](https://github.com/go-netty/go-netty-samples/tree/master/tcp_server)的基础上测试并没有出现你说的问题)

有传输层的实现:https://github.com/go-netty/go-netty-transport/tree/master/tls

当前的实现不是reactor模式,是基于net包的同步模式