Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
The ZeroMQ module abstracts away the low-level 0MQ based interface with IPython, replacing it
instead with a Haskell Channel based interface. The serveProfile
function takes a IPython
profile specification and returns the channel interface to use.
Synopsis
- data ZeroMQInterface = Channels {}
- data ZeroMQStdin = StdinChannel {}
- serveProfile :: Profile -> Bool -> IO ZeroMQInterface
- serveStdin :: Profile -> IO ZeroMQStdin
- data ZeroMQEphemeralPorts
- withEphemeralPorts :: ByteString -> Bool -> (ZeroMQEphemeralPorts -> ZeroMQInterface -> IO a) -> IO a
Documentation
data ZeroMQInterface Source #
The channel interface to the ZeroMQ sockets. All communication is done via Messages, which are encoded and decoded into a lower level form before being transmitted to IPython. These channels should functionally serve as high-level sockets which speak Messages instead of ByteStrings.
Channels | |
|
data ZeroMQStdin Source #
:: Profile | The profile specifying which ports and transport mechanisms to use. |
-> Bool | Print debug output |
-> IO ZeroMQInterface | The Message-channel based interface to the sockets. |
Start responding on all ZeroMQ channels used to communicate with IPython | via the provided profile. Return a set of channels which can be used to | communicate with IPython in a more structured manner.
serveStdin :: Profile -> IO ZeroMQStdin Source #
data ZeroMQEphemeralPorts Source #
Describes ports used when creating an ephemeral ZeroMQ session. Used to generate the ipython JSON config file.
Instances
ToJSON ZeroMQEphemeralPorts Source # | |
Defined in IHaskell.IPython.ZeroMQ toJSON :: ZeroMQEphemeralPorts -> Value # toEncoding :: ZeroMQEphemeralPorts -> Encoding # toJSONList :: [ZeroMQEphemeralPorts] -> Value # toEncodingList :: [ZeroMQEphemeralPorts] -> Encoding # |
:: ByteString | HMAC encryption key |
-> Bool | Print debug output |
-> (ZeroMQEphemeralPorts -> ZeroMQInterface -> IO a) | Callback that takes the interface to the sockets. |
-> IO a |
Run session for communicating with an IPython instance on ephemerally allocated ZMQ4 sockets. The sockets will be closed when the callback returns.