mirror of
https://github.com/tribufu/node-gamedig
synced 2026-05-06 15:17:36 +00:00
More async conversion
This commit is contained in:
parent
484e99b29c
commit
efe12a00aa
25 changed files with 774 additions and 858 deletions
|
|
@ -1,7 +1,8 @@
|
|||
const Iconv = require('iconv-lite'),
|
||||
Long = require('long'),
|
||||
Core = require('../protocols/core'),
|
||||
Buffer = require('buffer');
|
||||
Buffer = require('buffer'),
|
||||
Varint = require('varint');
|
||||
|
||||
function readUInt64BE(buffer,offset) {
|
||||
const high = buffer.readUInt32BE(offset);
|
||||
|
|
@ -126,6 +127,12 @@ class Reader {
|
|||
return r;
|
||||
}
|
||||
|
||||
varint() {
|
||||
const out = Varint.decode(this.buffer, this.i);
|
||||
this.i += Varint.decode.bytes;
|
||||
return out;
|
||||
}
|
||||
|
||||
/** @returns Buffer */
|
||||
part(bytes) {
|
||||
let r;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue