tcp_server hang

Marc Lehmann schmorp at schmorp.de
Thu Sep 20 12:48:29 CEST 2018


On Wed, Sep 19, 2018 at 03:07:01PM +0500, Eduard Ivanov <houspi at gmail.com> wrote:
> I thought that shutdown would be enough.

Well, no, but additionally, shutdown almost never does the right thing for
you (for tcp). The only reason you should nornmally use shutdown for is
for protocols where the other side needs to close the connection first but
your protocol does not have a way to signal the other side to do so, other
than sending an EOF.

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schmorp at schmorp.de
      -=====/_/_//_/\_,_/ /_/\_\



More information about the anyevent mailing list