haskell-socket
haskell-socket copied to clipboard
Add shutdown operation for Stream sockets
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.