Constructor
new InvPacket(itemsnullable)
Create a inv
packet.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
items |
Array.<InvItem> |
<nullable> |
Properties:
Name | Type | Description |
---|---|---|
items |
Array.<InvItem> |
- Source:
Extends
- Packet
Methods
(static) fromRaw(data, encnullable) → {InvPacket}
Instantiate inv packet from serialized data.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
data |
Buffer | ||
enc |
String |
<nullable> |
- Source:
Returns:
- Type
- InvPacket
(static) fromReader(br) → {InvPacket}
Instantiate inv packet from buffer reader.
Parameters:
Name | Type | Description |
---|---|---|
br |
BufferReader |
- Source:
Returns:
- Type
- InvPacket
(private) fromRaw(data)
Inject properties from serialized data.
Parameters:
Name | Type | Description |
---|---|---|
data |
Buffer |
- Source:
(private) fromReader(br)
Inject properties from buffer reader.
Parameters:
Name | Type | Description |
---|---|---|
br |
BufferReader |
- Source:
getSize() → {Number}
Get serialization size.
- Source:
Returns:
- Type
- Number
toRaw() → {Buffer}
Serialize inv packet.
- Source:
Returns:
- Type
- Buffer
toWriter(bw)
Serialize inv packet to writer.
Parameters:
Name | Type | Description |
---|---|---|
bw |
Buffer |
- Source: