Skip to content

Commit

Permalink
:D
Browse files Browse the repository at this point in the history
  • Loading branch information
AnyBananaGAME committed Dec 9, 2024
1 parent 8c4abf1 commit 5ef7814
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sanctumterra/raknet",
"version": "1.3.58",
"version": "1.3.59",
"description": "",
"main": "dist/index.js",
"scripts": {
Expand Down
14 changes: 9 additions & 5 deletions src/client/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,23 @@ export class Client extends Emitter<ClientEvents> {
this.rakSocket = new RakSocket(
this.options.address,
this.options.port,
this.options.mtuSize,
this.options.debug,
// this.options.mtuSize, forgor
// this.options.debug,
);
}

public async connect(): Promise<Advertisement> {
this.rakSocket.connect();
this.ticker = setInterval(() => {
// this.rakSocket.receive();
this.rakSocket.tick();
this.handleData(this.rakSocket.receive());
const data = this.rakSocket.onEvent();
if (data) {
this.handleData(Buffer.from(data.data));
}
this.tick++;
}, 50);
}, 20);
await this.ping();
this.rakSocket.connect();
return new Promise((resolve, reject) => {
this.once("ack", () => {
this.emit("connect");
Expand Down
2 changes: 1 addition & 1 deletion src/client/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export * from "./client";
export * from "./client-events";
export * from "./client_options";
export * from "./client_options";
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "reflect-metadata";
import { Client } from "./client";
export * from "./client";
export * from "./proto";
export * from "./proto";
1 change: 0 additions & 1 deletion src/proto/types/valid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,3 @@ export type ValidTypes =
| typeof VarString
| typeof ZigZag
| typeof ZigZong;

0 comments on commit 5ef7814

Please sign in to comment.