d3f6d71
Branches > refactor/use-spec-1 > d3f6d71 > files
uhh comments
Commit: d3f6d71a094c5cef0b92521419b41cefdc515325
Parent: 0fa6363
2 changed files:
src/net/bowmap/message_application.clj view file
@@ -16,6 +16,10 @@ (S/def ::processes (s/coll-of ::process :type vector?)) (S/def ::response (s/schema [::client/client ::messages ::processes])) ; And eventually game events as well :) +; TODO+; I do think having these processes/timeouts/whatever be data with a deadline and just run the things by deadline order is better+; Right now they're scheduled and then you don't even know where they are and have no way to access them or associate them with+; a client... (defmulti apply-process (fn [process client] (::process-id process)))src/net/bowmap/minecraft_server.clj view file
@@ -11,9 +11,7 @@ ; The logical server, holds a set of clients connected (defn run-effects! [messages-out process-chan result]- ; Schedule processes (let [{:keys [::client/client ::a/processes ::a/messages]} result]- ;; Processes to start (doseq [process processes] (io-thread (<!! (timeout (::a/process-timeout process)))@@ -35,8 +33,6 @@ (defn handle-packets-and-messages! [client packets-in messages-out packets-out process-chan] (alt!!- ; Timeouts?- ; TODO should take the old process map so you can reuse timeouts if you want to! process-chan ([process] (handle-process! process client messages-out process-chan)) messages-out ([msg]