File tree 5 files changed +12
-9
lines changed
5 files changed +12
-9
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @sanctumterra/raknet" ,
3
- "version" : " 1.3.58 " ,
3
+ "version" : " 1.3.59 " ,
4
4
"description" : " " ,
5
5
"main" : " dist/index.js" ,
6
6
"scripts" : {
Original file line number Diff line number Diff line change @@ -32,19 +32,23 @@ export class Client extends Emitter<ClientEvents> {
32
32
this . rakSocket = new RakSocket (
33
33
this . options . address ,
34
34
this . options . port ,
35
- this . options . mtuSize ,
36
- this . options . debug ,
35
+ // this.options.mtuSize, forgor
36
+ // this.options.debug,
37
37
) ;
38
38
}
39
39
40
40
public async connect ( ) : Promise < Advertisement > {
41
- this . rakSocket . connect ( ) ;
42
41
this . ticker = setInterval ( ( ) => {
42
+ // this.rakSocket.receive();
43
43
this . rakSocket . tick ( ) ;
44
- this . handleData ( this . rakSocket . receive ( ) ) ;
44
+ const data = this . rakSocket . onEvent ( ) ;
45
+ if ( data ) {
46
+ this . handleData ( Buffer . from ( data . data ) ) ;
47
+ }
45
48
this . tick ++ ;
46
- } , 50 ) ;
49
+ } , 20 ) ;
47
50
await this . ping ( ) ;
51
+ this . rakSocket . connect ( ) ;
48
52
return new Promise ( ( resolve , reject ) => {
49
53
this . once ( "ack" , ( ) => {
50
54
this . emit ( "connect" ) ;
Original file line number Diff line number Diff line change 1
1
export * from "./client" ;
2
2
export * from "./client-events" ;
3
- export * from "./client_options" ;
3
+ export * from "./client_options" ;
Original file line number Diff line number Diff line change 1
1
import "reflect-metadata" ;
2
2
import { Client } from "./client" ;
3
3
export * from "./client" ;
4
- export * from "./proto" ;
4
+ export * from "./proto" ;
Original file line number Diff line number Diff line change @@ -58,4 +58,3 @@ export type ValidTypes =
58
58
| typeof VarString
59
59
| typeof ZigZag
60
60
| typeof ZigZong ;
61
-
You can’t perform that action at this time.
0 commit comments