??????÷??????-Receiver?????????

????1 ????

????“????+?”?????????????????????????????????????????

????Receiver?????????????????????????????????????Ч???????????ó???????????????????xml????????????????????????????

????Receiver????linux???????

????2 ???????

????A???? ???xml??????

????B???? ???xml??????

????C???? so??????

????3 ????

???? ????????????????socket?????????????

???? ?????????????????????

???? ???????????????

????(1) ???xml??????(??????????????????????????)

????(2) ???xml??????(????????????????????????????????????????)

????(3) so??????(???????????????????????????????)

?????? ?????????????? ???????????????????

????4 ??????

????4.1 ???xml??

???????????????????????????socket??????????header+req1?????????header+resp1??struct???????£?

????struct header{

????int cmd;

????char provider[200];

????int len;

????};

????struct req1{

????int id;

????};

????Struct item{

????Int a;

????Int b;

????};

????struct resp1{

????int result;

????char name[50];

????int count;

????struct item items[];

????};

???????????????????????xml????

???? ??header1.xml

???? ??req1.xml

?????? resp1.xml

???????endian?????????????0???????(???)

????Repeat?????????????????????????????鶨?壬?????????struct????????

????Type???????????????????????????

????#flowlen()????ú????????????????????????????н???????????????????????

????$TEMPRESULT????????????TEMPRESULT?ж??????

????@count ???????????????????5

???????????????????????????????ж??????????random???ú??????????

????????receiver??./receiver –p 3306 –r ./header.xml –r req1.xml –s header.xml –s resp1.xml -l 1 -u 0 -n -1 ????????????????????

?????????receiver??????header+req1??????????????header+resp1?????(result????????????????name ?hello world)??-l 1?????????? -u 0 ???tcp???? -n -1 ???receiver???????????????????

????4.2 ???xml??

???????????????????????????????????????÷????????xml????????????????????????????

????????????????????????£?

????header1+header2+reqX

?????????????

????header1+header2+respX

????(X?δ????????????????????????header2?е?cmd???????壬???????cmd???5?????????header1+header2+req5??????header1+header2+resp5)

???????????????????????????Щ?????????????????xml???????xmll????÷??????£?

??????????????xml??

????[gaowei@db-testing-cs33.db01.baidu.com receiver]$ cat xml/config.xml

????????receiver??./receiver –p 3306 –b config.xml -l 1 -u 0 -n -1 –t 5???????????????????????