Created
July 2, 2011 17:21
-
-
Save et4te/1061371 to your computer and use it in GitHub Desktop.
Bit too easy to do in this lang...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USING: io io.encodings.binary io.sockets byte-arrays.hex ; | |
IN: riak | |
! ---------------------------------------------------------------------------- | |
CONSTANT: rpb-ping-req HEX{ 00 00 00 01 01 } | |
CONSTANT: rpb-ping-resp HEX{ 00 00 00 01 02 } | |
CONSTANT: rpb-get-client-id-req HEX{ 00 00 00 01 03 } | |
CONSTANT: rpb-get-client-id-resp HEX{ 00 00 00 07 04 0A 04 01 65 01 B5 } | |
: request ( req -- resp ) | |
"127.0.0.1" 8087 <inet> binary [ | |
write flush 5 read | |
] with-client ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment