@@ -463,20 +463,20 @@ class MessageBuffer {
463463 }
464464
465465 public writeUInt8 ( n : number ) : void {
466- this . _buff . writeUint8 ( n , this . _offset ) ; this . _offset += 1 ;
466+ this . _buff . writeUInt8 ( n , this . _offset ) ; this . _offset += 1 ;
467467 }
468468
469469 public readUInt8 ( ) : number {
470- const n = this . _buff . readUint8 ( this . _offset ) ; this . _offset += 1 ;
470+ const n = this . _buff . readUInt8 ( this . _offset ) ; this . _offset += 1 ;
471471 return n ;
472472 }
473473
474474 public writeUInt32 ( n : number ) : void {
475- this . _buff . writeUint32BE ( n , this . _offset ) ; this . _offset += 4 ;
475+ this . _buff . writeUInt32BE ( n , this . _offset ) ; this . _offset += 4 ;
476476 }
477477
478478 public readUInt32 ( ) : number {
479- const n = this . _buff . readUint32BE ( this . _offset ) ; this . _offset += 4 ;
479+ const n = this . _buff . readUInt32BE ( this . _offset ) ; this . _offset += 4 ;
480480 return n ;
481481 }
482482
@@ -485,12 +485,12 @@ class MessageBuffer {
485485 }
486486
487487 public writeShortString ( str : VSBuffer ) : void {
488- this . _buff . writeUint8 ( str . byteLength , this . _offset ) ; this . _offset += 1 ;
488+ this . _buff . writeUInt8 ( str . byteLength , this . _offset ) ; this . _offset += 1 ;
489489 this . _buff . set ( str , this . _offset ) ; this . _offset += str . byteLength ;
490490 }
491491
492492 public readShortString ( ) : string {
493- const strByteLength = this . _buff . readUint8 ( this . _offset ) ; this . _offset += 1 ;
493+ const strByteLength = this . _buff . readUInt8 ( this . _offset ) ; this . _offset += 1 ;
494494 const strBuff = this . _buff . slice ( this . _offset , this . _offset + strByteLength ) ;
495495 const str = strBuff . toString ( ) ; this . _offset += strByteLength ;
496496 return str ;
@@ -501,19 +501,19 @@ class MessageBuffer {
501501 }
502502
503503 public writeLongString ( str : VSBuffer ) : void {
504- this . _buff . writeUint32BE ( str . byteLength , this . _offset ) ; this . _offset += 4 ;
504+ this . _buff . writeUInt32BE ( str . byteLength , this . _offset ) ; this . _offset += 4 ;
505505 this . _buff . set ( str , this . _offset ) ; this . _offset += str . byteLength ;
506506 }
507507
508508 public readLongString ( ) : string {
509- const strByteLength = this . _buff . readUint32BE ( this . _offset ) ; this . _offset += 4 ;
509+ const strByteLength = this . _buff . readUInt32BE ( this . _offset ) ; this . _offset += 4 ;
510510 const strBuff = this . _buff . slice ( this . _offset , this . _offset + strByteLength ) ;
511511 const str = strBuff . toString ( ) ; this . _offset += strByteLength ;
512512 return str ;
513513 }
514514
515515 public writeBuffer ( buff : VSBuffer ) : void {
516- this . _buff . writeUint32BE ( buff . byteLength , this . _offset ) ; this . _offset += 4 ;
516+ this . _buff . writeUInt32BE ( buff . byteLength , this . _offset ) ; this . _offset += 4 ;
517517 this . _buff . set ( buff , this . _offset ) ; this . _offset += buff . byteLength ;
518518 }
519519
@@ -522,12 +522,12 @@ class MessageBuffer {
522522 }
523523
524524 public writeVSBuffer ( buff : VSBuffer ) : void {
525- this . _buff . writeUint32BE ( buff . byteLength , this . _offset ) ; this . _offset += 4 ;
525+ this . _buff . writeUInt32BE ( buff . byteLength , this . _offset ) ; this . _offset += 4 ;
526526 this . _buff . set ( buff , this . _offset ) ; this . _offset += buff . byteLength ;
527527 }
528528
529529 public readVSBuffer ( ) : VSBuffer {
530- const buffLength = this . _buff . readUint32BE ( this . _offset ) ; this . _offset += 4 ;
530+ const buffLength = this . _buff . readUInt32BE ( this . _offset ) ; this . _offset += 4 ;
531531 const buff = this . _buff . slice ( this . _offset , this . _offset + buffLength ) ; this . _offset += buffLength ;
532532 return buff ;
533533 }
@@ -549,7 +549,7 @@ class MessageBuffer {
549549 }
550550
551551 public writeMixedArray ( arr : VSBuffer [ ] , arrType : ArgType [ ] ) : void {
552- this . _buff . writeUint8 ( arr . length , this . _offset ) ; this . _offset += 1 ;
552+ this . _buff . writeUInt8 ( arr . length , this . _offset ) ; this . _offset += 1 ;
553553 for ( let i = 0 , len = arr . length ; i < len ; i ++ ) {
554554 const el = arr [ i ] ;
555555 const elType = arrType [ i ] ;
@@ -564,7 +564,7 @@ class MessageBuffer {
564564 }
565565
566566 public readMixedArray ( ) : Array < string | VSBuffer > {
567- const arrLen = this . _buff . readUint8 ( this . _offset ) ; this . _offset += 1 ;
567+ const arrLen = this . _buff . readUInt8 ( this . _offset ) ; this . _offset += 1 ;
568568 let arr : Array < string | VSBuffer > = new Array ( arrLen ) ;
569569 for ( let i = 0 ; i < arrLen ; i ++ ) {
570570 const argType = < ArgType > this . readUInt8 ( ) ;
0 commit comments