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

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

Network.NineP.Server

Description

Listening on sockets for the incoming requests.

Synopsis

Documentation

data NineFile Source

Constructors

RegularFile 

Fields

read :: Word64 -> Word32 -> ErrorT NineError IO ByteString
 
write :: Word64 -> ByteString -> ErrorT NineError IO Word32
 
remove :: IO ()
 
stat :: IO Stat

The directory stat must return only stat for ..

wstat :: Stat -> IO ()
 
version :: IO Word32
 
Directory 

Fields

getFiles :: IO [NineFile]

A callback to get the list of the files this directory contains. Must not contain . and .. entries.

parent :: IO (Maybe NineFile)
 
descend :: String -> ErrorT NineError IO NineFile

A callback to address a specific file by its name. . and .. are handled in the library.

remove :: IO ()
 
stat :: IO Stat

The directory stat must return only stat for ..

wstat :: Stat -> IO ()
 
version :: IO Word32
 

data Config Source

Server configuration.

Constructors

Config 

Fields

root :: NineFile

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!pathto/socket for unix socket files, and tcp!hostname!port for tcp sockets.

run9PServer :: Config -> IO ()Source

Run the actual server