Remove unused writeOldHeader function
This commit is contained in:
parent
8312399f9d
commit
9bb1710a9f
|
@ -98,23 +98,6 @@ export default {
|
|||
return util.concatUint8Array([this.writeTag(tag_type), this.writeSimpleLength(length)]);
|
||||
},
|
||||
|
||||
/**
|
||||
* Writes a packet header Version 3 with the given tag_type and length to a
|
||||
* string
|
||||
*
|
||||
* @param {Integer} tag_type Tag type
|
||||
* @param {Integer} length Length of the payload
|
||||
* @returns {String} String of the header
|
||||
*/
|
||||
writeOldHeader: function(tag_type, length) {
|
||||
if (length < 256) {
|
||||
return new Uint8Array([0x80 | (tag_type << 2), length]);
|
||||
} else if (length < 65536) {
|
||||
return util.concatUint8Array([new Uint8Array([0x80 | (tag_type << 2) | 1]), util.writeNumber(length, 2)]);
|
||||
}
|
||||
return util.concatUint8Array([new Uint8Array([0x80 | (tag_type << 2) | 2]), util.writeNumber(length, 4)]);
|
||||
},
|
||||
|
||||
/**
|
||||
* Whether the packet type supports partial lengths per RFC4880
|
||||
* @param {Integer} tag_type Tag type
|
||||
|
|
Loading…
Reference in New Issue
Block a user