 (declare shutdown)
 
 (defn- process-requests
-  "Set up loops to read requests on our local channel and send them to the OLA server, and read its responses
-  and  dispatch them to the proper handlers. Needs to be called in a future since it uses blocking reads from
-  the server socket."
+  "Set up loops to read requests on our local channel and send them to
+  the OLA server, and read its responses and dispatch them to the
+  proper handlers. Needs to be called in a future since it uses
+  blocking reads from the server socket."
   [channel]
 
   (let [connection (atom (connect-server nil))

(ns afterglow.ola-client
  (:require [flatland.protobuf.core :refer :all]
            [clojure.java.io :as io]
            [clojure.core.cache :as cache]

      (warn e "Unable to connect to olad server, is it running?"))))

(defn- build-header
  "Calculates the correct 4-byte header value for an OLA request of
  the specified length."
  [length]
  (bit-or (bit-and length size-mask) version-masked))

(defn- parse-header
  "Returns the length encoded by a header value, after validating the
  protocol version."
  [header]
  (if (= (bit-and header version-mask) version-masked)
    (bit-and header size-mask)
