首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Python > 二进制编码的类似xml的通信协议编码库

二进制编码的类似xml的通信协议编码库

资 源 简 介

类似xml的通信协议编码库 实现了结构化数据流二进制的编解码,可以想数组一样使用["数据名"]方便的读写数据,且像xml一样,数据之间没有顺序依赖。 当前支持语言:C++,希望有兴趣的朋友一起来完成java php python等语言的版本。 协议样例(绿色为说明) 2D00 BStruct长度(45byte msgid(11)+Student(34)) 0500 msgid 字段名:长度+msgid 0200 D107 msgid值:长度+2001 0700 Student 字段名:长度+Student 1. 00 嵌套BStruct Student值:长度+嵌套BStruct 嵌套BStruct展开如下 1. 00 BStruct长度(21byte name(13)+aga(8)) 0400 name 成员名:长度+name 0500 huoyu name值:长度+huoyu 0300 age 成员名:长度+age 0100 1F age值:长度+31 使用范例: 发送结构 char buf256; bsp::BStruct msg; msg.Bind(buf,256);//绑定buf,添加数据都会复制入buf末尾 msg["msgid"] = (unsigned short)

文 件 列 表

bstruct
bstruct.dsp
makefile
example
example.cpp
example.dsp
example.h
makefile
include
BArray.h
BStruct.h
Debug
FixLengthInt.h
Stream.h
jni
android.mk
Application.mk
source
BArray.cpp
BStruct.cpp
Stream.cpp
project.dsw
VIP VIP
0.188741s