For TCP, only shutting down the send direction makes sense, however to
be compatible to the BSD sockets API, keep the direction argument, and
when someone tries to shut down the receive direction, just disable the
receive callback.
Note that on most operating systems, SHUT_RD actually doesn't do
anything at all, it won't prevent reads from returning data.
Also be a bit more strict, return EINVAL or ENOTCONN when appropriate.