Skip to content

Instantly share code, notes, and snippets.

@lfranchi
Created October 9, 2012 19:53
Show Gist options
  • Save lfranchi/3861025 to your computer and use it in GitHub Desktop.
Save lfranchi/3861025 to your computer and use it in GitHub Desktop.
(use 'gloss.core 'gloss.io 'lamina.core 'aleph.tcp)
(require 'cheshire.core)
(use 'clojure.pprint)
(def init-msg {
:conntype "accept-offer"
:nodeid "66bd135d-113f-481a-977e-111111111111"
:key 123
:port 50210
})
(def json (cheshire.core/generate-string init-msg))
(def frame (finite-frame
(prefix
[:int32 :byte]
first
(fn [x] [x 2]))
(string :utf-8)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment