Skip to content

Commit

Permalink
2.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
JadlionHD committed Nov 23, 2024
1 parent 0352693 commit 0ae7f88
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
12 changes: 7 additions & 5 deletions lib/structures/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,13 @@ export class Client extends EventEmitter {
}
});

return this.host.send(
netID,
Buffer.concat(packets.filter((packet): packet is Buffer => packet !== undefined)),
channelID
);
packets
.filter((packet): packet is Buffer => packet !== undefined)
.forEach((v) => {
this.host.send(netID, v as Buffer, channelID);
});

return;
}

public connect(ipAddress: string, port: number) {
Expand Down
12 changes: 7 additions & 5 deletions lib/structures/Peer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,13 @@ export class Peer<T extends PeerData> {
}
});

return _client.send(
netID,
Buffer.concat(packets.filter((packet): packet is Buffer => packet !== undefined)),
channelID
);
packets
.filter((packet): packet is Buffer => packet !== undefined)
.forEach((v) => {
_client.send(netID, v as Buffer, channelID);
});

return;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "growtopia.js",
"description": "A Rust based, cross-platform, high-performance Growtopia private server framework utilizing Node.js, Bun.js.",
"version": "2.0.4",
"version": "2.0.5",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
Expand Down

0 comments on commit 0ae7f88

Please sign in to comment.