this project can make and build sproto in windows, sproto build to binary need lpeg library
click sprototool.sln and build
# cd example
# lua53.exe generate_spb.lua
#you can use in your project
local sproto = require "sproto"
local sprotoloader = require "sprotoloader"
local f = assert(io.open("protocol.spb", "rb"), "Can't open sproto file")
local binary = f:read "*all"
f:close()
sprotoloader.save(binary, 1)
local sp = sprotoloader.load(1)
local proto = sp:host("Package")
local request = proto:attach(sp)
local bytes = request("foobar", {what="here is a boy, is your friends", boy={name="Bob", id=33333, email="[email protected]"}}
local type, name, request, response = proto:dispatch(bytes)
print(type, name, request, response)