message.clj

Branches > client-handling-rewrite > 0bcb212 > files / src / net / bowmap / network / message.clj

(ns net.bowmap.network.message
  (:require
   [clojure.alpha.spec :as s]
   [dev.grahp.spec :as S]))

(S/def ::id
  "The id of a message. See the serverbound and clientbound packet definitions for the names."
  qualified-keyword?)

(S/def ::message
  "Represents a logical message map (object) from client to/from server.
   'Packet' is used to refer to a serialized message"
  (s/schema [::id]))