5640ebb
Branches > client-handling-rewrite > 5640ebb > files
Formatting
Commit: 5640ebbd35b82541447a7caf2bee3780c6e6a703
Parent: e939b69
1 changed file:
src/net/bowmap/packet/client.clj view file
@@ -29,28 +29,28 @@ but some packets have duplicates across connection states that you'd want to handle in the same way. If it turns out that I don't end up handling packets in this way, then packet ids could map directly to numeric ids." (build-packet-ids- {::state/status- [::status-response- ::pong-response]- ::state/login- [::login-disconnect- ::encryption-request- ::login-success- ::set-compression- ::login-plugin-request- ::login-cookie-request]}))+ {::state/status+ [::status-response+ ::pong-response]+ ::state/login+ [::login-disconnect+ ::encryption-request+ ::login-success+ ::set-compression+ ::login-plugin-request+ ::login-cookie-request]})) (def ^{:spec (s/map-of ::pk/id (s/fspec :args (s/cat :buf #(instance? ByteBuf %) :pk ::pk/packet) :ret #(instance? ByteBuf %)))} packets (build-packets- {::status-response [:response "Response to ::sp/status-request" :json]- ::pong-response [:timestamp "The same timestamp as ::sp/ping-request" :long]- ::login-success [:uuid :uuid- :username :string- :properties [:list [:table [:name :string- :value :string- :signature [:optional :string]]]]]}))+ {::status-response [:response "Response to ::sp/status-request" :json]+ ::pong-response [:timestamp "The same timestamp as ::sp/ping-request" :long]+ ::login-success [:uuid :uuid+ :username :string+ :properties [:list [:table [:name :string+ :value :string+ :signature [:optional :string]]]]]})) (defn numeric-id [state id] (packet-ids {::state/state state ::pk/id id}))