我正在尝试记录两个现有系统之间的通信,而这两个系统现在已经非常糟糕了。我想知道是否有任何标准或最佳做法来记录我可以使用的网络通信协议?有几种特殊类型必须有文档记录和混合位顺序。
通信非常简单,就像这样(伪代码)
系统A->系统B (初始化通信)
short type; //Little endian系统B->系统A
short type; //Little endian
short count; //Little endian
//Start time
short NoOfDaysSince1970; //Big endian
int noOfMillisecoundsToday; //Big ending
if(type==1)
for(int i=0;i<count;i++)
char[20] name;
else
for(int i=0;i<count;i++)
float value; //platform specific float, Little ending
for(int i=0;i<count;i++)
short flag; //Big ending
//Stop time
short noOfDaysSince1970; //Big ending
int noOfMillisecoundsToday; //Big ending发布于 2012-08-31 12:09:56
你可以看看抽象语法表示法。
https://stackoverflow.com/questions/12214538
复制相似问题