lib/protocol.js
function parse(data, initExpected) {
		var lines, i, last;
		data = tail + data;
		data = data.replace(/\r*\n+/g, "\n");
		lines = data.split("\n");
		last = lines.length - 1;
		for (i = 0; i < last; i++) {
			messages.push(read(lines[i], initExpected));
		}
		tail = lines[lines.length - 1];
	}
function parse(data, initExpected) {
		var lines, i, last;
		data = tail + data;
		data = data.replace(/\r*\n+/g, "\n");
		lines = data.split("\n");
		last = lines.length - 1;
		for (i = 0; i < last; i++) {
			messages.push(read(lines[i], initExpected));
		}
		tail = lines[lines.length - 1];
	}
function parse ( data , initExpected ) { var lines , i , last ; data = tail + data ; data = data . replace ( / \r*\n+ / g , "\n" ) ; lines = data . split ( "\n" ) ; last = lines . length - 1 ; for ( i = 0 ; i < last ; i ++ ) { messages . push ( read ( lines [ i ] , initExpected ) ) ; } tail = lines [ lines . length - 1 ] ; }
Parsa new data.
@param {String} data New data from the stream
Parsa new data .