           (.removeServiceListener mdns-service reg-type service-listener)
           (.close mdns-service))))))
 
-(defn resolve-bonjour [bonjour-name timeout]
-  (let [reg-type "_http._tcp.local."
-        mdns-service (JmDNS/create)]
-    (try
-      (let [info (.getServiceInfo mdns-service reg-type bonjour-name timeout)]
-        (when info
-          {:address (.getAddress info)
-           :port    (.getPort info)}))
-      (finally
-        (future
-          (.close mdns-service))))))
-
 (defn socket [host port]
   (let [socket (doto (Socket. host port) (.setKeepAlive true))
         in     (io/reader socket)

  (let [{:keys [out]} @(:socket repl-env)
        response-promise (promise)]
    (reset! (:response-promise repl-env) response-promise)
    (try
      (write out js)
      (let [response @response-promise]
        (if (= :eof response)
          (do
            (reconnect-if repl-env)
            {:status :error
             :value  "Connection closed."})
          (let [result (json/read-str response
                         :key-fn keyword)]
            (merge
              {:status (keyword (:status result))
               :value  (:value result)}
              (when-let [raw-stacktrace (:stacktrace result)]
                {:stacktrace raw-stacktrace})))))
      (catch Exception _
        (reconnect-if repl-env)))))

(defn load-javascript
  "Load a Closure JavaScript file into the JSC REPL process."

          env (ana/empty-env)
          core (io/resource "cljs/core.cljs")]
      ((println-fn opts) "\nConnecting to" (bonjour-name->display-name bonjour-name) "...\n")
      (set-up-socket repl-env opts endpoint-address (dec endpoint-port))
      (when (= "true" (:value (jsc-eval repl-env "typeof cljs === 'undefined'")))
        ;; compile cljs.core & its dependencies, goog/base.js must be available
