Safe Haskell | None |
---|---|
Language | Haskell98 |
Synopsis
- sourceSocket :: MonadIO m => Socket -> ConduitT i ByteString m ()
- sinkSocket :: MonadIO m => Socket -> ConduitT ByteString o m ()
- data AppDataUnix
- appSource :: (HasReadWrite ad, MonadIO m) => ad -> ConduitT i ByteString m ()
- appSink :: (HasReadWrite ad, MonadIO m) => ad -> ConduitT ByteString o m ()
- data ServerSettingsUnix
- serverSettings :: FilePath -> ServerSettingsUnix
- runUnixServer :: ServerSettingsUnix -> (AppDataUnix -> IO ()) -> IO a
- data ClientSettingsUnix
- clientSettings :: FilePath -> ClientSettingsUnix
- runUnixClient :: ClientSettingsUnix -> (AppDataUnix -> IO a) -> IO a
- getPath :: HasPath a => a -> FilePath
- getAfterBind :: HasAfterBind a => a -> Socket -> IO ()
- setPath :: HasPath a => FilePath -> a -> a
- setAfterBind :: HasAfterBind a => (Socket -> IO ()) -> a -> a
Basic utilities
sourceSocket :: MonadIO m => Socket -> ConduitT i ByteString m () #
Stream data from the socket.
This function does not automatically close the socket.
Since 0.0.0
sinkSocket :: MonadIO m => Socket -> ConduitT ByteString o m () #
Stream data to the socket.
This function does not automatically close the socket.
Since 0.0.0
Simple server/client interface
data AppDataUnix #
The data passed to a Unix domain sockets Application
.
Instances
HasReadWrite AppDataUnix | |
Defined in Data.Streaming.Network readLens :: Functor f => (IO ByteString -> f (IO ByteString)) -> AppDataUnix -> f AppDataUnix # writeLens :: Functor f => ((ByteString -> IO ()) -> f (ByteString -> IO ())) -> AppDataUnix -> f AppDataUnix # |
appSource :: (HasReadWrite ad, MonadIO m) => ad -> ConduitT i ByteString m () #
appSink :: (HasReadWrite ad, MonadIO m) => ad -> ConduitT ByteString o m () #
Server
data ServerSettingsUnix #
Settings for a Unix domain sockets server.
Instances
HasPath ServerSettingsUnix | |
Defined in Data.Streaming.Network pathLens :: Functor f => (FilePath -> f FilePath) -> ServerSettingsUnix -> f ServerSettingsUnix # | |
HasAfterBind ServerSettingsUnix | |
Defined in Data.Streaming.Network afterBindLens :: Functor f => ((Socket -> IO ()) -> f (Socket -> IO ())) -> ServerSettingsUnix -> f ServerSettingsUnix # | |
HasReadBufferSize ServerSettingsUnix | Since 0.1.13 |
Defined in Data.Streaming.Network readBufferSizeLens :: Functor f => (Int -> f Int) -> ServerSettingsUnix -> f ServerSettingsUnix # |
runUnixServer :: ServerSettingsUnix -> (AppDataUnix -> IO ()) -> IO a #
Run an Application
with the given settings. This function will create a
new listening socket, accept connections on it, and spawn a new thread for
each connection.
Client
data ClientSettingsUnix #
Settings for a Unix domain sockets client.
Instances
HasPath ClientSettingsUnix | |
Defined in Data.Streaming.Network pathLens :: Functor f => (FilePath -> f FilePath) -> ClientSettingsUnix -> f ClientSettingsUnix # | |
HasReadBufferSize ClientSettingsUnix | Since 0.1.14 |
Defined in Data.Streaming.Network readBufferSizeLens :: Functor f => (Int -> f Int) -> ClientSettingsUnix -> f ClientSettingsUnix # |
runUnixClient :: ClientSettingsUnix -> (AppDataUnix -> IO a) -> IO a #
Run an Application
by connecting to the specified server.
Getters
getAfterBind :: HasAfterBind a => a -> Socket -> IO () #
Setters
setAfterBind :: HasAfterBind a => (Socket -> IO ()) -> a -> a #