yedf2 / handy

🔥简洁易用的C++11网络库 / 支持单机千万并发连接 / a simple C++11 network server framework
BSD 2-Clause "Simplified" License
4.56k stars 1.33k forks source link

Question about channel life cycle #103

Open hankai17 opened 2 years ago

hankai17 commented 2 years ago

https://github.com/yedf2/handy/blob/c16cde9ae1c801ededf2555519bbab2af5496625/handy/poller.cc#L97 https://github.com/yedf2/handy/blob/c16cde9ae1c801ededf2555519bbab2af5496625/handy/conn.cc#L109 It seem's in channel's Callback delete channel.

yedf2 commented 2 years ago

Yes, if the data stream in the tcp connection has finished, then the channel should be closed and deleted