I'm going to implement a complex, dynamic, binary protocol in Clojure using Aleph and Gloss. Now, Aleph is awesome and Gloss makes things much easier, but protocol in question has lots of optional fields.
Q: Can a Gloss' header->body function return another header? Or should I dynamically build the map to be compiled into codec?
And more general question: Are there any best practices or examples of building dynamic network protocols in clojure?