              [tf2demo])
   (:require-macros
    [cljs.core.async.macros :as asyncm :refer [go go-loop]]))
-
-(def obj-proto (js/Object.getPrototypeOf #js {}))
-
-(extend-type js/tf2demo.PacketEntity
-  IEncodeClojure
-  (-js->clj [x opts]
-    (js/Object.setPrototypeOf x obj-proto)
-    ))
-
-;; (extend-type js/tf2demo.SendProp
-;;   IEncodeClojure
-;;   (-js->clj [x opts] (h/plainify x)))
-;; (extend-type js/tf2demo.SendPropDefinition
-;;   IEncodeClojure
-;;   (-js->clj [x opts] (h/plainify x)))
-;; (extend-type js/tf2demo.ServerClass
-;;   IEncodeClojure
-;;   (-js->clj [x opts] (h/plainify x)))
-
 
 (defn setImmediate [fn] (js/setTimeout fn 50))
 

            (doseq [p packets]
              (aset chunk @idx p)
              (swap! idx inc))
;;             (println "loopin loopin" @idx n (not packets) (and packets (< @idx n)))
            (if (and packets (< @idx n))
              (recur)
              @idx)))]

      (put! output-chan packets
            (fn [result]
              (when result
                (if (>= (count packets) parse-chunk-size)
                  (setImmediate #(parse-loop-async parser output-chan))
                  (close! output-chan))))))))
