 (defn events->combo
   "
   Returns a lazy sequence of combo messages. Each message is at most
-  xymon-max-line long.
+  message-max-length long.
   "
   ([formatter events]
    (events->combo formatter events combo-header combo-header-len))

        (.setSoTimeout sock (:timeout opts))
        (.connect sock addr (:timeout opts))
        (with-open [writer (io/writer sock)]
          (.write writer line)
          (.flush writer)))
      (catch Exception e
        ((:error-handler opts) opts e)))))

(defn xymon
  "

           next-length (count next)
           length (+ len next-length 2)
           events (rest events)]
       (if (< length message-max-length)
         (recur formatter events (str message next "\n\n") length)
         (cons message (lazy-seq (events->combo formatter events))))))))

