Skip to content

flip111/haskell-socket-unix

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Available on Hackage License MIT Build Status Stackage LTS GitHub release

socket-unix

A Unix domain socket API for the socket library.

This is a fork maintained at GitHub.
Please refer to this repository for the latest updates, issue tracking, and contributions.

Usage

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"

Symlinks

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.

Portability

Linux and OS X are supported.

About

A Unix domain socket extension for the socket library. https://flip111.github.io/haskell-socket-unix/index.html

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages

  • Haskell 100.0%