From 9bb1710a9ffe379e22e71a6e1ffa8e1120629cbb Mon Sep 17 00:00:00 2001 From: Daniel Huigens Date: Fri, 7 Jun 2019 17:11:45 +0200 Subject: [PATCH] Remove unused writeOldHeader function --- src/packet/packet.js | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/packet/packet.js b/src/packet/packet.js index 11a62695..ee4e85f4 100644 --- a/src/packet/packet.js +++ b/src/packet/packet.js @@ -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