haskell-socket
haskell-socket copied to clipboard
Add socketToFd, a safe-ish Socket destruction method
socketToFd invalidates the socket to the rest of the API like close would, but returns the file descriptor instead. This is useful to have if you need an destructor of Socket, but prevents you from continuing to use the Socket even though you are using the file descriptor independently of it.
Partially addresses #62.