    {:port port}))
 
 (defn app [daemon net-ch inbound-ch release-ch]
-  ; TODO: Need a way to stop this loop
   (go-loop []
            (let [[msg-type payload] (<!! net-ch)]
              (try 

              [gloss.io :as io]
              [gloss.core :as gloss]
              [clojure.edn :as edn]
              [aleph.tcp :as tcp])
    (:import [java.nio ByteBuffer]))


          release-ch (chan (clojure.core.async/dropping-buffer 10000))
          daemon (:acking-daemon component)
          ip "0.0.0.0"
          server (start-server (ch-handler net-ch) 0)
          app-loop (app daemon net-ch inbound-ch release-ch)]
      (assoc component :app-loop app-loop :server server :ip ip :port (aleph-netty/port server) :release-ch release-ch)))

  (stop [component]
    (taoensso.timbre/info "Stopping Aleph TCP Sockets")
    (close! (:app-loop component))
    (close! (:release-ch component))
    (assoc component :release-ch nil)))

(defn aleph-tcp-sockets [opts]
  (map->AlephTcpSockets {:opts opts}))

; Not much need for these in aleph
(defmethod extensions/send-peer-site AlephTcpSockets
  [messenger]
  [(:ip messenger) (:port messenger)])
