Allenxuxu / gev

🚀Gev is a lightweight, fast non-blocking TCP network library / websocket server based on Reactor mode. Support custom protocols to quickly and easily build high-performance servers.
MIT License
1.73k stars 194 forks source link

Connection.ShutdownWrite() #27

Closed hagbei closed 4 years ago

hagbei commented 4 years ago

调用了Connection.ShutdownWrite()怎么不能断开链接,调用后客户端依然可以发送数据,服务端也能收到数据。

Allenxuxu commented 4 years ago

调用了Connection.ShutdownWrite()怎么不能断开链接,调用后客户端依然可以发送数据,服务端也能收到数据。

ShutdownWrite 仅仅是关闭写端。 服务端 ShutdownWrite 之后,客户端会 read 0,此时客户端应该关闭连接。