@sanctumterra/raknet 1.0.12 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bun.lockb
CHANGED
|
Binary file
|
|
@@ -202,7 +202,6 @@ class FrameHandler {
|
|
|
202
202
|
console.error('Failed to deserialize IncomingPacket!');
|
|
203
203
|
return;
|
|
204
204
|
}
|
|
205
|
-
console.log('packet ', packet);
|
|
206
205
|
const sendFrame = new _raknet.Frame();
|
|
207
206
|
sendFrame.reliability = _raknet.Reliability.ReliableOrdered;
|
|
208
207
|
sendFrame.orderChannel = 0;
|
|
@@ -23,7 +23,7 @@ class PacketHandler {
|
|
|
23
23
|
];
|
|
24
24
|
if (!ignore.includes(packetId)) _Logger.Logger.debug("Received Packet ID " + packetId);
|
|
25
25
|
switch(packetId){
|
|
26
|
-
case _raknet.Bitflags.Valid
|
|
26
|
+
case _raknet.Bitflags.Valid:
|
|
27
27
|
this.framehandler.handleFrameSet(buffer);
|
|
28
28
|
break;
|
|
29
29
|
case _raknet.Packet.OpenConnectionReply1:
|
|
@@ -75,7 +75,7 @@ class PacketHandler {
|
|
|
75
75
|
const packet = new _raknet.OpenConnectionRequest1();
|
|
76
76
|
packet.magic = Buffer.from("\0\xFF\xFF\0\xFE\xFE\xFE\xFE\xFD\xFD\xFD\xFD4Vx", "binary");
|
|
77
77
|
packet.protocol = this.client.protocol;
|
|
78
|
-
packet.mtu = 1024 -
|
|
78
|
+
packet.mtu = 1024 - 36;
|
|
79
79
|
const serializedPacket = packet.serialize();
|
|
80
80
|
this.client.send(serializedPacket);
|
|
81
81
|
}
|
package/dist/src/client/Queue.js
CHANGED
|
@@ -52,7 +52,7 @@ class Queue {
|
|
|
52
52
|
queueFrame(frame, priority) {
|
|
53
53
|
let length = _raknet.DGRAM_HEADER_SIZE;
|
|
54
54
|
for (const frame of this.outputFrames)length += frame.getByteLength();
|
|
55
|
-
if (length + frame.getByteLength() > this.mtu -
|
|
55
|
+
if (length + frame.getByteLength() > this.mtu - 36) this.sendQueue(this.outputFrames.size);
|
|
56
56
|
this.outputFrames.add(frame);
|
|
57
57
|
if (priority === _raknet.Priority.Immediate) return this.sendQueue(1);
|
|
58
58
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanctumterra/raknet",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.14",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"emitDeclarationOnly": true,
|
|
@@ -24,9 +24,8 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@serenityjs/binarystream": "^2.6.6",
|
|
27
|
-
"@serenityjs/raknet": "0.4.
|
|
27
|
+
"@serenityjs/raknet": "^0.4.1-beta-20240717055334",
|
|
28
28
|
"chalk": "^4.1.2",
|
|
29
|
-
"i": "^0.3.7",
|
|
30
29
|
"npm": "^10.8.2",
|
|
31
30
|
"path": "^0.12.7"
|
|
32
31
|
}
|