第四章peek例子是一个监控流量的应用,他可以监控通讯中的XML文本
var conn = new Strophe.Connection(
"http://xxxx:7070/http-bind/");
对于conn对象有两组 数据发送和接收的钩子函数xmlInput ,xmlOutput 监控的传输过程中的数据是结构化的,而rawInput()和rawOutput()是原始的XML文本数据
conn.xmlInput = function (body) {
console.log("in");
};
conn.xmlOutput = function (body) {
console.log( body.childNodes.length);
};