    (let [i (.readLong (:in @conn))]
      i))
 
+(defn -read-short [conn]
+   (let [i (.readShort (:in @conn))]
+     i))
+
 (defn -read-string16 [conn]
   (let [str-len (.readShort (:in @conn))
         s (apply str (repeatedly str-len #(.readChar (:in @conn))))]

(defn read-packet-timeupdate [conn]
      (-> {}
          (assoc :time (-read-long conn))))


(defn read-packet [conn packet-id]

(def minecraft-local {:name "localhost" :port 25565})

; Packet Type Maps -----------------------------------------------------------------
(def packet-types {
     0x00 :keepalive 
     0x01 :login 
     0x02 :handshake 
     0x03 :chat 
     0x04 :timeupdate 
     0x05 :equipment 
})
(def packet-ids (apply assoc {} (mapcat reverse packet-types)))

(declare conn-handler)

