0cffe1e
Branches > main > 0cffe1e > files / src / net / bowmap
Comments and such
Commit: 0cffe1e50b7cb11b0056f52856650935c56ba3f8
Parent: 508beeb
6 changed files:
src/net/bowmap/network/connection.clj view file
@@ -9,8 +9,6 @@ ; It is the I/O part of the client ; Clients are then I/O free -; TODO I really don't like any of this lol- (defn connection [socket] {::socket socket ::input-stream (Socket/.getInputStream socket)src/net/bowmap/network/minecraft_server.clj view file
@@ -11,6 +11,7 @@ (defn accept-connection!! [server-socket] (connection/connection (ServerSocket/.accept server-socket))) +; TODO document (defn start-server! [port] (when-let [server @server] (ServerSocket/.close server))src/net/bowmap/network/packets/serverbound.clj view file
@@ -146,9 +146,6 @@ #_::custom-click-action #_::accept-code-of-conduct - ;; This packet has more fields I just don't care about them :p- ;; This packet also has a bunch of fields that I probably do care about!- ; Play ::confirm-teleportation [:teleport-id ->varint]src/net/bowmap/server/logic.clj view file
@@ -23,7 +23,7 @@ ::entity/uuid ::player/player -; TODO start keepalive+; Want this to be pure, which means you need a way to encode that state change as data? (defmethod handler ::fact/player-joined [{:keys! [::player/player]}] (let [{:keys! [::entity/uuid]} player] (if (@server/players uuid)src/net/bowmap/server/server.clj view file
@@ -1,4 +1,6 @@ (ns net.bowmap.server.server) +; May of player uuids to their current values?+; Players may want to be refs themselves. (defonce players (ref {})) (def max-player-count 1000)src/net/bowmap/stormbow/responses.clj view file
@@ -2,9 +2,8 @@ (:require [clojure.core.async :refer [put!]] [net.bowmap.network.client :as client]- [net.bowmap.network.connection :as connection] [net.bowmap.network.packet :as pk]- [net.bowmap.network.packets.clientbound :as clientbound :refer [encode-packet!]]+ [net.bowmap.network.packets.clientbound :as clientbound] [net.bowmap.network.state :as state] [net.bowmap.stormbow.response :as response])) @@ -14,18 +13,11 @@ ::client/client ::state/connection-state -; TODO currently this must always happen within a transaction, but that's no good!-; This is being called _always_ synchronously from the packet handler, which is also no good for even more reasons-; So, figure out how to not do that?--; This method works outside of a transaction, but it's being passed the client _value_-; The client value may well have changed since this method was called (defmethod handle-response! ::response/send-server-list [response] (let [{:keys! [::client/client server-list-response]} response- {:keys! [::state/connection-state ::client/clientbound-packets]} client+ {:keys! [::client/clientbound-packets]} client packet {::pk/id ::clientbound/status-response :response server-list-response}]- ; Probably just want to return these packets (put! clientbound-packets packet))) (defn handle-responses! [responses]