-
Notifications
You must be signed in to change notification settings - Fork 0
Documentation
HOUIS Mathis edited this page Dec 19, 2021
·
5 revisions
new BufferWS(buffer)
Parameter | Type | Description |
---|---|---|
buffer | Buffer or Uint8Array |
Constructs a new BufferWS.
BufferWS.readByte()
Parameter | Type | Description |
---|---|---|
@return | number |
Reads a byte.
BufferWS.readBool()
Parameter | Type | Description |
---|---|---|
@return | boolean |
Reads a boolean.
BufferWS.readShort()
Parameter | Type | Description |
---|---|---|
@return | number |
Reads a short.
BufferWS.readInt()
Parameter | Type | Description |
---|---|---|
@return | number |
Reads an integer.
BufferWS.readDouble()
Parameter | Type | Description |
---|---|---|
@return | number |
Reads a double.
BufferWS.readString()
Parameter | Type | Description |
---|---|---|
@return | string |
Reads a string.
BufferWS.writeByte(value)
Parameter | Type | Description |
---|---|---|
value | number | |
@return | BufferWS | this |
Writes a byte.
BufferWS.writeBool(value)
Parameter | Type | Description |
---|---|---|
value | boolean | |
@return | BufferWS | this |
Writes a boolean.
BufferWS.writeShort(value)
Parameter | Type | Description |
---|---|---|
value | number | |
@return | BufferWS | this |
Writes a short.
BufferWS.writeInt(value)
Parameter | Type | Description |
---|---|---|
value | number | |
@return | BufferWS | this |
Writes an integer.
BufferWS.writeDouble(value)
Parameter | Type | Description |
---|---|---|
value | number | |
@return | BufferWS | this |
Writes a double.
BufferWS.writeString(value)
Parameter | Type | Description |
---|---|---|
value | string | |
@return | BufferWS | this |
Writes a string.
BufferWS.getByteArray()
Parameter | Type | Description |
---|---|---|
@return | Uint8Array |
Return the bytearray of the BufferWS.
BufferWS.getBuffer()
Parameter | Type | Description |
---|---|---|
@return | Buffer |
Return the buffer.
BufferWS.flip()
Parameter | Type | Description |
---|---|---|
@return | BufferWS | this |
Make the buffer ready for a new sequence of write or relative read operations.