Unix domain sockets https://github.com/vyacheslavhashov/haskell-socket-unix#readme
|Latest on Hackage:||0.2.0.0|
This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.
# socket-unix A Unix domain socket API for the socket library.
Creating the Unix domain socket:
import System.Socket import System.Socket.Type.Stream import System.Socket.Family.Unix s <- socket :: IO (Socket Unix Stream Unix)
Creating the address for binding/connecting
address <- case socketAddressUnixPath "example.sock" of Just addr -> pure addr Nothing -> putStrLn "invalid pathname for socket"
Binding to a socket with a filename creates a socket in the filesystem, but does not unlink it after
close called. You should handle deleting links yourself.
Linux and OS X are supported.