     (reset! nrepl-server server)
     (reset! nrepl-session session)
     (let [shell-handler     (configure-shell-handler
-                             shell-socket iopub-socket signer client)
+                             shell-socket stdin-socket iopub-socket signer client)
           sigint-handle (fn [] (nrepl-interrupt client))]
       (reset! (beckon/signal-atom "INT") #{sigint-handle})
       (event-loop shell-socket iopub-socket signer shell-handler))))

          message (zmq/receive hb-socket)]
      (zmq/send hb-socket message))))

(defn shell-loop [shell-socket iopub-socket signer checker]
  (with-open [server    (start-nrepl-server)
              transport (nrepl/connect :port (:port server))
              client    (nrepl/client transport Integer/MAX_VALUE)

        (stderr (stacktrace-string (nrepl-trace nrepl-client))
        ))
    @result)))
(defn nrepl-complete [code nrepl-client]
  (let [ns @current-ns
        result (-> nrepl-client
                   (nrepl/message {:op :complete
