Safe Haskell | None |
---|---|
Language | Haskell98 |
- initLog :: ServerOpts -> IO SessionLog
- runServer :: ServerOpts -> ServerM IO () -> IO ()
- type Server = Worker (ServerM IO)
- setupServer :: ServerOpts -> ServerM IO ()
- shutdownServer :: ServerOpts -> ServerM IO ()
- startServer :: ServerOpts -> IO Server
- startServer_ :: ServerOpts -> IO Server
- stopServer :: Server -> IO ()
- withServer :: ServerOpts -> (Server -> IO a) -> IO a
- withServer_ :: ServerOpts -> (Server -> IO a) -> IO a
- inServer :: Server -> ServerM IO a -> IO a
- clientCommand :: CommandOptions -> Command -> ServerM IO Result
- parseCommand :: [String] -> Either String Command
- readCommand :: [String] -> Command
- sendServer :: Server -> CommandOptions -> [String] -> IO Result
- sendServer_ :: Server -> [String] -> IO Result
- findPath :: MonadIO m => CommandOptions -> FilePath -> m FilePath
- processRequest :: SessionMonad m => CommandOptions -> Command -> m Result
- processClient :: SessionMonad m => String -> Chan ByteString -> (ByteString -> IO ()) -> m ()
- processClientSocket :: SessionMonad m => String -> Socket -> m ()
- unMmap :: Response -> IO Response
- makeSocket :: ConnectionPort -> IO Socket
- sockAddr :: ConnectionPort -> HostAddress -> SockAddr
- module HsDev.Server.Types
- module HsDev.Server.Message
Documentation
initLog :: ServerOpts -> IO SessionLog Source #
Inits log chan and returns functions (print message, wait channel)
setupServer :: ServerOpts -> ServerM IO () Source #
Start listening for incoming connections
shutdownServer :: ServerOpts -> ServerM IO () Source #
Shutdown server
startServer :: ServerOpts -> IO Server Source #
startServer_ :: ServerOpts -> IO Server Source #
stopServer :: Server -> IO () Source #
withServer :: ServerOpts -> (Server -> IO a) -> IO a Source #
withServer_ :: ServerOpts -> (Server -> IO a) -> IO a Source #
clientCommand :: CommandOptions -> Command -> ServerM IO Result Source #
readCommand :: [String] -> Command Source #
sendServer :: Server -> CommandOptions -> [String] -> IO Result Source #
processRequest :: SessionMonad m => CommandOptions -> Command -> m Result Source #
Process request, notifications can be sent during processing
processClient :: SessionMonad m => String -> Chan ByteString -> (ByteString -> IO ()) -> m () Source #
Process client, listen for requests and process them
processClientSocket :: SessionMonad m => String -> Socket -> m () Source #
Process client by socket
makeSocket :: ConnectionPort -> IO Socket Source #
sockAddr :: ConnectionPort -> HostAddress -> SockAddr Source #
module HsDev.Server.Types
module HsDev.Server.Message