ipython-kernel 0.10.0.0 → 0.10.1.0
raw patch · 3 files changed
+10/−10 lines, 3 files
Files
- ipython-kernel.cabal +1/−1
- src/IHaskell/IPython/Message/Parser.hs +1/−1
- src/IHaskell/IPython/ZeroMQ.hs +8/−8
ipython-kernel.cabal view
@@ -1,5 +1,5 @@ name: ipython-kernel-version: 0.10.0.0+version: 0.10.1.0 synopsis: A library for creating kernels for IPython frontends description: ipython-kernel is a library for communicating with frontends for the interactive IPython framework. It is used extensively in IHaskell, the interactive Haskell environment.
src/IHaskell/IPython/Message/Parser.hs view
@@ -15,7 +15,7 @@ import qualified Data.ByteString.Lazy as Lazy import Data.HashMap.Strict as HM import Data.Maybe (fromMaybe)-import Data.Text (Text, unpack)+import Data.Text (unpack) import Debug.Trace import IHaskell.IPython.Types
src/IHaskell/IPython/ZeroMQ.hs view
@@ -92,14 +92,14 @@ -- complete, the context or socket become invalid. _ <- forkIO $ withContext $ \ctxt -> do -- Serve on all sockets.- _ <- forkIO $ serveSocket ctxt Rep (hbPort profile) $ heartbeat channels- _ <- forkIO $ serveSocket ctxt Router (controlPort profile) $ control debug channels- _ <- forkIO $ serveSocket ctxt Router (shellPort profile) $ shell debug channels+ _ <- forkIO $ serveSocket ctxt Rep (ip profile) (hbPort profile) $ heartbeat channels+ _ <- forkIO $ serveSocket ctxt Router (ip profile) (controlPort profile) $ control debug channels+ _ <- forkIO $ serveSocket ctxt Router (ip profile) (shellPort profile) $ shell debug channels -- The ctxt is reference counted in this thread only. Thus, the last serveSocket cannot be -- asynchronous, because otherwise ctxt would be garbage collectable - since it would only be -- used in other threads. Thus, keep the last serveSocket in this thread.- serveSocket ctxt Pub (iopubPort profile) $ iopub debug channels+ serveSocket ctxt Pub (ip profile) (iopubPort profile) $ iopub debug channels return channels @@ -182,7 +182,7 @@ -- complete, the context or socket become invalid. _ <- forkIO $ withContext $ \ctxt -> -- Serve on all sockets.- serveSocket ctxt Router (stdinPort profile) $ \sock -> do+ serveSocket ctxt Router (ip profile) (stdinPort profile) $ \sock -> do -- Read the request from the interface channel and send it. readChan reqChannel >>= sendMessage False (signatureKey profile) sock @@ -193,10 +193,10 @@ -- | Serve on a given sock in a separate thread. Bind the sock in the | given context and then -- loop the provided action, which should listen | on the sock and respond to any events.-serveSocket :: SocketType a => Context -> a -> Port -> (Socket a -> IO b) -> IO ()-serveSocket ctxt socketType port action = void $+serveSocket :: SocketType a => Context -> a -> IP -> Port -> (Socket a -> IO b) -> IO ()+serveSocket ctxt socketType ipAddress port action = void $ withSocket ctxt socketType $ \sock -> do- bind sock $ "tcp://127.0.0.1:" ++ show port+ bind sock $ "tcp://" ++ ipAddress ++ ":" ++ show port forever $ action sock -- | Listener on the heartbeat port. Echoes back any data it was sent.