Is there a way to close only the “one end” of a TCP socket to clearly indicate that one side of the connection is made by recording the connection? (Just like you do with a pipe in every Unix pipe tutorial ever.) Or do I need to use some kind of in-band solution, like a sentinel value or something like that?
You can disable the socket for reading or writing using the second parameter for the method:
shutdown(sock, SHUT_RD) shutdown(sock, SHUT_WR)
shutdown() , , ( , ). , .
Source: https://habr.com/ru/post/1740060/More articles:PHP: how to find the most used array key? - arraysОшибки разработки Fluid в ie7 - htmlSplitting PDF to png - ruby-on-railsskip reading headers in MATLAB - file-ioSolving the quadratic equation, but getting weird errors - fortranCabal: error message / missing documentation - haskellwget.listing file, there is a way to specify its name - linuxAdd dynamic watermark change to PDF in SharePoint - dynamicPassing non-iterable to list.extend () - pythonHow to write this url in Django? - urlAll Articles