572775e
Branches > namespace-reorganization > 572775e > files
update client packet docstring
Commit: 572775e98566a4b2d61e8dc16a37219c61c83f8a
Parent: c3d1d46
1 changed file:
src/net/bowmap/packet/client.clj view file
@@ -87,8 +87,12 @@ (defn packet-encoder [pk] (packets (::pk/id pk))) +;; Maybe this should just be a function of the packet :p (defn encode-packet- "Encodes packet 'pk' into a ByteBuf of the packet bytes."+ "Encodes packet 'pk' into a ByteBuf of the packet bytes.+ Like decoding, encoding a packet also requires the connection state, as+ packet ids are not unique across connection state, so there isn't a+ direct mapping of packet ids to numeric ids. This could be changed, of course." [pk state] {:pre [(pk/packet? pk)]} (let [id (assert! (numeric-id state (::pk/id pk)))