Skip to content

Instantly share code, notes, and snippets.

@bjering
Created August 2, 2010 12:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjering/7c931dbedfb6eb488131 to your computer and use it in GitHub Desktop.
Save bjering/7c931dbedfb6eb488131 to your computer and use it in GitHub Desktop.
(defn encode
"Creates a buffer prepared for a Flash XMLSocket"
[str]
(. ChannelBuffers wrappedBuffer
(into-array [
(.getBytes str "UTF-8")
(byte-array [(byte 0)])])))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment