Skip to content

Instantly share code, notes, and snippets.

@jpfuentes2
Created December 9, 2013 20:47
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 jpfuentes2/7880564 to your computer and use it in GitHub Desktop.
Save jpfuentes2/7880564 to your computer and use it in GitHub Desktop.
irb(main):001:0> require 'msgpack'
=> true
irb(main):002:0> msg = {Command: "Handshake", Seq: 0}
=> {:Command=>"Handshake", :Seq=>0}
irb(main):003:0> msg = MessagePack.pack(msg)
=> "\x82\xA7Command\xA9Handshake\xA3Seq\x00"
irb(main):004:0> MessagePack.unpack(msg)
=> {"Command"=>"Handshake", "Seq"=>0}
# client = MarilynRPC::NativeClient.connect_tcp('localhost', 7373)
# client.for(msg)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment