Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 597 Bytes

README.md

File metadata and controls

31 lines (21 loc) · 597 Bytes

JProtoc

protoc with as3 will js etc

code just like protobuf.

put YourMsg.as and jprotoc_as3/src to your project

//write
var msg:YourMsg=new YourMsg;
msg.field1=1;
var bytes:ByteArray = msg.writeTo(null);

//read
var msg:YourMsg=new YourMsg;
msg.readFrom(input,len);
trace(msg.field1);

compile

1.download protobuf 2.5 from the protobuf main page.

2.download JProtoc from the git.

3.enter bat fold.and change the path with your path protobuf and jProtoc.

4.run jprotocas3app.bat.and your can get the YourMsg.as