--- a/src/clojurecraft/core.clj Tue Jun 21 21:18:32 2011 -0400
+++ b/src/clojurecraft/core.clj Tue Jun 21 21:19:50 2011 -0400
@@ -62,6 +62,11 @@
(doto (:out @conn)
(.writeDouble (int i))))
+(defn -write-float [conn i]
+ (println (str "-> FLOAT: " i))
+ (doto (:out @conn)
+ (.writeFloat (int i))))
+
(defn -write-string16 [conn s]
(-write-short conn (count s))
(println (str "-> STRING: " s))
@@ -155,6 +160,14 @@
(let [b (.readBoolean (:in @conn))]
b))
+(defn -read-double [conn]
+ (let [i (.readDouble (:in @conn))]
+ i))
+
+(defn -read-float [conn]
+ (let [i (.readFloat (:in @conn))]
+ i))
+
(defn -read-string16 [conn]
(let [str-len (.readShort (:in @conn))
s (apply str (repeatedly str-len #(.readChar (:in @conn))))]