Network-NineP-0.4.2: High-level abstraction over 9P protocol

StabilityUltra-Violence
PortabilityI'm too young to die
Safe HaskellNone
LanguageHaskell98

Network.NineP.Server

Description

Listening on sockets for the incoming requests.

Synopsis

Documentation

data NineFile m Source #

Constructors

RegularFile 

Fields

Directory 

Fields

boringFile :: (Monad m, EmbedIO m) => String -> NineFile m Source #

A dumb file that can't do anything.

boringDir :: (Monad m, EmbedIO m) => String -> [(String, NineFile m)] -> NineFile m Source #

A dumb directory that can't do anything but provide the files it contains. An user can create files, but they won't show up in listing and will essentially be boringFiles.

data Config m Source #

Server configuration.

Constructors

Config 

Fields

  • root :: NineFile m

    The / directory of the hosted filesystem.

  • addr :: String

    The listening address. The syntax is taken from Plan 9 operating system and has the form unix!/path/to/socket for unix socket files, and tcp!hostname!port for tcp sockets.

  • monadState :: Content m

    The initial state for the user-supplied monad. Use Void for IO.

run9PServer :: EmbedIO m => Config m -> IO () Source #

Run the actual server using the supplied configuration.