Skip to content

Commit

Permalink
cmdSeq support setting UInt32 sequence only API
Browse files Browse the repository at this point in the history
so the split content can have different SEQs
  • Loading branch information
kaven276 committed Jun 4, 2012
1 parent bf95847 commit 6690a5c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/cmdSeq.js
Expand Up @@ -20,6 +20,12 @@ function genNextSeq(buf){
return buf;
}

function genNextSeqSplit(buf){
curSeq = (curSeq === 0xffffffff) ? 0 : curSeq + 1;
buf.writeUInt32BE(curSeq, 16);
return buf;
}


function readSeq(buf, offset){
// buf = new Buffer(12);
Expand All @@ -32,6 +38,7 @@ function readSeq(buf, offset){
}

exports.genNextSeq = genNextSeq;
exports.genNextSeqSplit = genNextSeqSplit;
exports.readSeq = readSeq;

if (bUnitText) {
Expand Down

0 comments on commit 6690a5c

Please sign in to comment.