6934025

Branches > main > 6934025 > files / src / net / bowmap / server

Update encode-packet! docstring

Grahp, 2026-08-20

Commit: 693402587ac987ad9289f406f22016d1c830afd3
Parent: ac83dad

1 changed file:

src/net/bowmap/network/packets/clientbound.clj modified (view file)

@@ -283,12 +283,10 @@ (def packet-ids (build-packet-id-index packet-order)) (def packet-encoders (build-packet-encode-functions packets)) -; TODO update docstring (defn encode-packet!-  "Encodes a message into a packet.-   Like decoding, encoding a packet requires the connection state, as packet-   ids are not unique across connection states. Several packets are logically-   the same across states, and can be sent without needing to switch on state."+  "Encodes a packet into a frame.+   Requires the connection state, as packet ids are not unique across connection states.+   Several packets are logically the same across states."   [packet state]   (let [payload-writer (req! packet-encoders (::pk/id packet))]     (length-prefixed (-> (Unpooled/buffer)