haskell-socket icon indicating copy to clipboard operation
haskell-socket copied to clipboard

Add shutdown operation for Stream sockets

Open sternenseemann opened this issue 3 years ago • 0 comments

shutdown is useful since it can be used to send a TCP FIN which in turn requires the other side to close the connection as well making it possible to gracefully terminate a TCP connection.

Windows is untested as of now, ~~but CI should take care of that~~.

Test cases have been added, unfortunately, the exceptions don't seem to line up across platforms, but that doesn't seem to be a design goal of this library.

Currently the action is tied to Stream, rather than TCP (which doesn't make a difference currently), as the action is not necessarily TCP specific, but I'm not 100% certain.

sternenseemann avatar Mar 14 '21 22:03 sternenseemann