socket-unix: A Unix domain sockets

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.


A Unix domain socket extension for the socket library

[Skip to ReadMe]


Change logNone available
Dependenciesbase (>=4.7 && <5), bytestring (>= && <0.11), socket (>= && < [details]
Copyright2017 Vyacheslav Hashov
AuthorVyacheslav Hashov
CategorySystem, Network
Home page
Source repositoryhead: git clone
UploadedFri Jan 6 05:16:49 UTC 2017 by VyacheslavHashov




Maintainers' corner

For package maintainers and hackage trustees

Readme for socket-unix-

[back to package description]

Available on Hackage License MIT Build Status


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.


Only Linux is supported.