【发布时间】:2012-08-31 11:35:48
【问题描述】:
我正在尝试记录两个现有系统之间的通信,这些系统目前非常糟糕。我想知道是否有任何标准或最佳实践来记录我可以使用的网络通信协议? 有几种特殊类型必须记录和混合位顺序
通信很简单,就是这样(伪代码)
System A->System 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
【问题讨论】:
标签: documentation communication specifications