e2093ff
Branches > client-handling-rewrite > e2093ff > files / src / net / bowmap / network / packet / frame.clj
Rename packet-ids
Commit: e2093ff39f40e6f823118540958e72b40059bc32
Parent: ea9b833
1 changed file:
src/net/bowmap/network/message/server.clj view file
@@ -40,7 +40,7 @@ ; TODO document why ids are enumerated like this? (def ^{:spec (s/map-of (s/schema [::state/connection-state ::pk/id]) ::msg/id)}- packet-ids+ numeric-ids (build-message-id-map {::state/handshaking [::handshaking]@@ -267,12 +267,12 @@ ::use-item-on TODO ::use-item TODO})) -(assert (= (set (vals packet-ids))+(assert (= (set (vals numeric-ids)) (set (keys packets)))) (comment (require '[clojure.set :as set])- (let [all-ids (set (vals packet-ids))+ (let [all-ids (set (vals numeric-ids)) present-ids (set (keys packets))] (set/difference all-ids present-ids))) @@ -286,7 +286,7 @@ 4. The contents of 'buf' are not a valid packet" [packet state] (let [numeric-id (->varint packet)- message-id (packet-ids {::state/connection-state state ::pk/id numeric-id})+ message-id (numeric-ids {::state/connection-state state ::pk/id numeric-id}) reader (req! packets message-id)] (adorn (reader packet) "Error while calling packet reader" {:numeric-id numeric-id :packet-id message-id :reader reader})))