Commit fbce6be3 authored by Jordan Sissel's avatar Jordan Sissel

- purge old stuff

parent 07d5505b
make -C ../ build/lib/libsodium.so build/lib/libzmq.so
make -C ../ build/include/sodium/sodium.h build/include/zmq.h
export CGO_CFLAGS=-I$PWD/../build/include
export CGO_LDFLAGS=-L$PWD/../build/lib
go get github.com/alecthomas/gozmq
#go install github.com/alecthomas/gozmq
#go install sodium
echo "Building lumberjack"
go install -ldflags '-r $ORIGIN/../lib' lumberjack
echo "Building keygen"
go install -ldflags '-r $ORIGIN/../lib' keygen
require "ffi-rzmq"
require "zlib"
require "msgpack"
c = ZMQ::Context.new
s = c.socket(ZMQ::REP)
s.bind("tcp://*:5005")
msg = ""
msg.force_encoding("BINARY")
start = Time.now
count = 0
loop do
rc = s.recv_string(msg)
#p msg
original = Zlib::Inflate.inflate(msg)
events = MessagePack.unpack(original)
count += events.count
p events
#if count > 100000
#puts count / (Time.now - start)
#count = 0
#start = Time.now
#end
s.send_string("")
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment