@webvpn/dgram 0.0.1 → 0.2.0
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/build/index.cjs +2235 -2327
- package/build/index.cjs.map +1 -1
- package/build/index.d.ts +5 -184
- package/build/index.js +10094 -2664
- package/build/index.js.map +1 -1
- package/package.json +4 -6
- package/src/index.ts +5 -698
- package/vite-plugin-node-stdlib-browser.cjs +61 -61
- package/vite.config.ts +29 -29
- package/build/index.mjs +0 -3252
- package/build/index.mjs.map +0 -1
- package/build/test.d.ts +0 -1
- package/build/utils.d.ts +0 -13
- package/index.html +0 -11
- package/src/chrome-dgram.js +0 -503
- package/src/flatbuffers/client-packet-type.ts +0 -40
- package/src/flatbuffers/client-packet.ts +0 -162
- package/src/flatbuffers/client-tcpserver-close.ts +0 -93
- package/src/flatbuffers/client-tcpserver-get-connections.ts +0 -93
- package/src/flatbuffers/client-tcpserver-listen.ts +0 -211
- package/src/flatbuffers/client-tcpserver.ts +0 -159
- package/src/flatbuffers/client-tcpsocket-connect.ts +0 -253
- package/src/flatbuffers/client-tcpsocket-destroy-soon.ts +0 -75
- package/src/flatbuffers/client-tcpsocket-destroy.ts +0 -93
- package/src/flatbuffers/client-tcpsocket-end.ts +0 -93
- package/src/flatbuffers/client-tcpsocket-pause.ts +0 -75
- package/src/flatbuffers/client-tcpsocket-reset-and-destroy.ts +0 -75
- package/src/flatbuffers/client-tcpsocket-resume.ts +0 -75
- package/src/flatbuffers/client-tcpsocket-set-encoding.ts +0 -93
- package/src/flatbuffers/client-tcpsocket-set-keep-alive.ts +0 -103
- package/src/flatbuffers/client-tcpsocket-set-no-delay.ts +0 -89
- package/src/flatbuffers/client-tcpsocket-set-timeout.ts +0 -107
- package/src/flatbuffers/client-tcpsocket-write.ts +0 -147
- package/src/flatbuffers/client-tcpsocket.ts +0 -89
- package/src/flatbuffers/client-udpsocket-add-membership.ts +0 -110
- package/src/flatbuffers/client-udpsocket-add-source-specific-membership.ts +0 -127
- package/src/flatbuffers/client-udpsocket-bind.ts +0 -138
- package/src/flatbuffers/client-udpsocket-close.ts +0 -93
- package/src/flatbuffers/client-udpsocket-disconnect.ts +0 -75
- package/src/flatbuffers/client-udpsocket-drop-membership.ts +0 -110
- package/src/flatbuffers/client-udpsocket-drop-source-specific-membership.ts +0 -127
- package/src/flatbuffers/client-udpsocket-send.ts +0 -189
- package/src/flatbuffers/client-udpsocket-set-broadcast.ts +0 -89
- package/src/flatbuffers/client-udpsocket-set-multicast-interface.ts +0 -93
- package/src/flatbuffers/client-udpsocket-set-multicast-loopback.ts +0 -89
- package/src/flatbuffers/client-udpsocket-set-multicast-ttl.ts +0 -89
- package/src/flatbuffers/client-udpsocket-set-recv-buffer-size.ts +0 -89
- package/src/flatbuffers/client-udpsocket-set-send-buffer-size.ts +0 -89
- package/src/flatbuffers/client-udpsocket-set-ttl.ts +0 -89
- package/src/flatbuffers/client-udpsocket.ts +0 -149
- package/src/flatbuffers/packet-handshake-type.ts +0 -9
- package/src/flatbuffers/packet.ts +0 -210
- package/src/flatbuffers/schema.ts +0 -75
- package/src/flatbuffers/server-packet-type.ts +0 -38
- package/src/flatbuffers/server-packet.ts +0 -158
- package/src/flatbuffers/server-tcpserver-callback-close.ts +0 -93
- package/src/flatbuffers/server-tcpserver-callback-get-connections.ts +0 -124
- package/src/flatbuffers/server-tcpserver-callback-listen.ts +0 -141
- package/src/flatbuffers/server-tcpserver-event-close.ts +0 -75
- package/src/flatbuffers/server-tcpserver-event-drop.ts +0 -75
- package/src/flatbuffers/server-tcpserver-event-error.ts +0 -75
- package/src/flatbuffers/server-tcpserver-event-listening.ts +0 -124
- package/src/flatbuffers/server-tcpsocket-callback-connect.ts +0 -189
- package/src/flatbuffers/server-tcpsocket-callback-end.ts +0 -93
- package/src/flatbuffers/server-tcpsocket-callback-set-timeout.ts +0 -93
- package/src/flatbuffers/server-tcpsocket-callback-write.ts +0 -93
- package/src/flatbuffers/server-tcpsocket-event-close.ts +0 -89
- package/src/flatbuffers/server-tcpsocket-event-connect.ts +0 -172
- package/src/flatbuffers/server-tcpsocket-event-connection-attempt-failed.ts +0 -138
- package/src/flatbuffers/server-tcpsocket-event-connection-attempt-timeout.ts +0 -121
- package/src/flatbuffers/server-tcpsocket-event-connection-attempt.ts +0 -121
- package/src/flatbuffers/server-tcpsocket-event-data.ts +0 -113
- package/src/flatbuffers/server-tcpsocket-event-drain.ts +0 -75
- package/src/flatbuffers/server-tcpsocket-event-end.ts +0 -75
- package/src/flatbuffers/server-tcpsocket-event-error.ts +0 -93
- package/src/flatbuffers/server-tcpsocket-event-lookup.ts +0 -141
- package/src/flatbuffers/server-tcpsocket-event-ready.ts +0 -75
- package/src/flatbuffers/server-tcpsocket-event-timeout.ts +0 -75
- package/src/flatbuffers/server-udpsocket-callback-bind.ts +0 -141
- package/src/flatbuffers/server-udpsocket-callback-close.ts +0 -93
- package/src/flatbuffers/server-udpsocket-callback-connect.ts +0 -141
- package/src/flatbuffers/server-udpsocket-callback-send.ts +0 -93
- package/src/flatbuffers/server-udpsocket-event-close.ts +0 -75
- package/src/flatbuffers/server-udpsocket-event-connect.ts +0 -75
- package/src/flatbuffers/server-udpsocket-event-error.ts +0 -93
- package/src/flatbuffers/server-udpsocket-event-listening.ts +0 -124
- package/src/flatbuffers/server-udpsocket-event-message.ts +0 -175
- package/src/net.js +0 -2442
- package/src/test.ts +0 -34
- package/src/types.ts +0 -16
- package/src/utils.ts +0 -45
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
|
-
|
|
3
|
-
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
4
|
-
|
|
5
|
-
import * as flatbuffers from 'flatbuffers';
|
|
6
|
-
|
|
7
|
-
import { ClientPacketType } from './client-packet-type.js';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export class ClientTCPSocketPause implements flatbuffers.IUnpackableObject<ClientTCPSocketPauseT> {
|
|
11
|
-
bb: flatbuffers.ByteBuffer|null = null;
|
|
12
|
-
bb_pos = 0;
|
|
13
|
-
__init(i:number, bb:flatbuffers.ByteBuffer):ClientTCPSocketPause {
|
|
14
|
-
this.bb_pos = i;
|
|
15
|
-
this.bb = bb;
|
|
16
|
-
return this;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
static getRootAsClientTCPSocketPause(bb:flatbuffers.ByteBuffer, obj?:ClientTCPSocketPause):ClientTCPSocketPause {
|
|
20
|
-
return (obj || new ClientTCPSocketPause()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
static getSizePrefixedRootAsClientTCPSocketPause(bb:flatbuffers.ByteBuffer, obj?:ClientTCPSocketPause):ClientTCPSocketPause {
|
|
24
|
-
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
25
|
-
return (obj || new ClientTCPSocketPause()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
type():ClientPacketType {
|
|
29
|
-
const offset = this.bb!.__offset(this.bb_pos, 4);
|
|
30
|
-
return offset ? this.bb!.readInt8(this.bb_pos + offset) : ClientPacketType.TCPSocket;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
static startClientTCPSocketPause(builder:flatbuffers.Builder) {
|
|
34
|
-
builder.startObject(1);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
static addType(builder:flatbuffers.Builder, type:ClientPacketType) {
|
|
38
|
-
builder.addFieldInt8(0, type, ClientPacketType.TCPSocket);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
static endClientTCPSocketPause(builder:flatbuffers.Builder):flatbuffers.Offset {
|
|
42
|
-
const offset = builder.endObject();
|
|
43
|
-
return offset;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
static createClientTCPSocketPause(builder:flatbuffers.Builder, type:ClientPacketType):flatbuffers.Offset {
|
|
47
|
-
ClientTCPSocketPause.startClientTCPSocketPause(builder);
|
|
48
|
-
ClientTCPSocketPause.addType(builder, type);
|
|
49
|
-
return ClientTCPSocketPause.endClientTCPSocketPause(builder);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
unpack(): ClientTCPSocketPauseT {
|
|
53
|
-
return new ClientTCPSocketPauseT(
|
|
54
|
-
this.type()
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
unpackTo(_o: ClientTCPSocketPauseT): void {
|
|
60
|
-
_o.type = this.type();
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export class ClientTCPSocketPauseT implements flatbuffers.IGeneratedObject {
|
|
65
|
-
constructor(
|
|
66
|
-
public type: ClientPacketType = ClientPacketType.TCPSocket
|
|
67
|
-
){}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
|
71
|
-
return ClientTCPSocketPause.createClientTCPSocketPause(builder,
|
|
72
|
-
this.type
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
|
-
|
|
3
|
-
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
4
|
-
|
|
5
|
-
import * as flatbuffers from 'flatbuffers';
|
|
6
|
-
|
|
7
|
-
import { ClientPacketType } from './client-packet-type.js';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export class ClientTCPSocketResetAndDestroy implements flatbuffers.IUnpackableObject<ClientTCPSocketResetAndDestroyT> {
|
|
11
|
-
bb: flatbuffers.ByteBuffer|null = null;
|
|
12
|
-
bb_pos = 0;
|
|
13
|
-
__init(i:number, bb:flatbuffers.ByteBuffer):ClientTCPSocketResetAndDestroy {
|
|
14
|
-
this.bb_pos = i;
|
|
15
|
-
this.bb = bb;
|
|
16
|
-
return this;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
static getRootAsClientTCPSocketResetAndDestroy(bb:flatbuffers.ByteBuffer, obj?:ClientTCPSocketResetAndDestroy):ClientTCPSocketResetAndDestroy {
|
|
20
|
-
return (obj || new ClientTCPSocketResetAndDestroy()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
static getSizePrefixedRootAsClientTCPSocketResetAndDestroy(bb:flatbuffers.ByteBuffer, obj?:ClientTCPSocketResetAndDestroy):ClientTCPSocketResetAndDestroy {
|
|
24
|
-
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
25
|
-
return (obj || new ClientTCPSocketResetAndDestroy()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
type():ClientPacketType {
|
|
29
|
-
const offset = this.bb!.__offset(this.bb_pos, 4);
|
|
30
|
-
return offset ? this.bb!.readInt8(this.bb_pos + offset) : ClientPacketType.TCPSocket;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
static startClientTCPSocketResetAndDestroy(builder:flatbuffers.Builder) {
|
|
34
|
-
builder.startObject(1);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
static addType(builder:flatbuffers.Builder, type:ClientPacketType) {
|
|
38
|
-
builder.addFieldInt8(0, type, ClientPacketType.TCPSocket);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
static endClientTCPSocketResetAndDestroy(builder:flatbuffers.Builder):flatbuffers.Offset {
|
|
42
|
-
const offset = builder.endObject();
|
|
43
|
-
return offset;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
static createClientTCPSocketResetAndDestroy(builder:flatbuffers.Builder, type:ClientPacketType):flatbuffers.Offset {
|
|
47
|
-
ClientTCPSocketResetAndDestroy.startClientTCPSocketResetAndDestroy(builder);
|
|
48
|
-
ClientTCPSocketResetAndDestroy.addType(builder, type);
|
|
49
|
-
return ClientTCPSocketResetAndDestroy.endClientTCPSocketResetAndDestroy(builder);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
unpack(): ClientTCPSocketResetAndDestroyT {
|
|
53
|
-
return new ClientTCPSocketResetAndDestroyT(
|
|
54
|
-
this.type()
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
unpackTo(_o: ClientTCPSocketResetAndDestroyT): void {
|
|
60
|
-
_o.type = this.type();
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export class ClientTCPSocketResetAndDestroyT implements flatbuffers.IGeneratedObject {
|
|
65
|
-
constructor(
|
|
66
|
-
public type: ClientPacketType = ClientPacketType.TCPSocket
|
|
67
|
-
){}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
|
71
|
-
return ClientTCPSocketResetAndDestroy.createClientTCPSocketResetAndDestroy(builder,
|
|
72
|
-
this.type
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
|
-
|
|
3
|
-
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
4
|
-
|
|
5
|
-
import * as flatbuffers from 'flatbuffers';
|
|
6
|
-
|
|
7
|
-
import { ClientPacketType } from './client-packet-type.js';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export class ClientTCPSocketResume implements flatbuffers.IUnpackableObject<ClientTCPSocketResumeT> {
|
|
11
|
-
bb: flatbuffers.ByteBuffer|null = null;
|
|
12
|
-
bb_pos = 0;
|
|
13
|
-
__init(i:number, bb:flatbuffers.ByteBuffer):ClientTCPSocketResume {
|
|
14
|
-
this.bb_pos = i;
|
|
15
|
-
this.bb = bb;
|
|
16
|
-
return this;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
static getRootAsClientTCPSocketResume(bb:flatbuffers.ByteBuffer, obj?:ClientTCPSocketResume):ClientTCPSocketResume {
|
|
20
|
-
return (obj || new ClientTCPSocketResume()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
static getSizePrefixedRootAsClientTCPSocketResume(bb:flatbuffers.ByteBuffer, obj?:ClientTCPSocketResume):ClientTCPSocketResume {
|
|
24
|
-
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
25
|
-
return (obj || new ClientTCPSocketResume()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
type():ClientPacketType {
|
|
29
|
-
const offset = this.bb!.__offset(this.bb_pos, 4);
|
|
30
|
-
return offset ? this.bb!.readInt8(this.bb_pos + offset) : ClientPacketType.TCPSocket;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
static startClientTCPSocketResume(builder:flatbuffers.Builder) {
|
|
34
|
-
builder.startObject(1);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
static addType(builder:flatbuffers.Builder, type:ClientPacketType) {
|
|
38
|
-
builder.addFieldInt8(0, type, ClientPacketType.TCPSocket);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
static endClientTCPSocketResume(builder:flatbuffers.Builder):flatbuffers.Offset {
|
|
42
|
-
const offset = builder.endObject();
|
|
43
|
-
return offset;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
static createClientTCPSocketResume(builder:flatbuffers.Builder, type:ClientPacketType):flatbuffers.Offset {
|
|
47
|
-
ClientTCPSocketResume.startClientTCPSocketResume(builder);
|
|
48
|
-
ClientTCPSocketResume.addType(builder, type);
|
|
49
|
-
return ClientTCPSocketResume.endClientTCPSocketResume(builder);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
unpack(): ClientTCPSocketResumeT {
|
|
53
|
-
return new ClientTCPSocketResumeT(
|
|
54
|
-
this.type()
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
unpackTo(_o: ClientTCPSocketResumeT): void {
|
|
60
|
-
_o.type = this.type();
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export class ClientTCPSocketResumeT implements flatbuffers.IGeneratedObject {
|
|
65
|
-
constructor(
|
|
66
|
-
public type: ClientPacketType = ClientPacketType.TCPSocket
|
|
67
|
-
){}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
|
71
|
-
return ClientTCPSocketResume.createClientTCPSocketResume(builder,
|
|
72
|
-
this.type
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
|
-
|
|
3
|
-
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
4
|
-
|
|
5
|
-
import * as flatbuffers from 'flatbuffers';
|
|
6
|
-
|
|
7
|
-
import { ClientPacketType } from './client-packet-type.js';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export class ClientTCPSocketSetEncoding implements flatbuffers.IUnpackableObject<ClientTCPSocketSetEncodingT> {
|
|
11
|
-
bb: flatbuffers.ByteBuffer|null = null;
|
|
12
|
-
bb_pos = 0;
|
|
13
|
-
__init(i:number, bb:flatbuffers.ByteBuffer):ClientTCPSocketSetEncoding {
|
|
14
|
-
this.bb_pos = i;
|
|
15
|
-
this.bb = bb;
|
|
16
|
-
return this;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
static getRootAsClientTCPSocketSetEncoding(bb:flatbuffers.ByteBuffer, obj?:ClientTCPSocketSetEncoding):ClientTCPSocketSetEncoding {
|
|
20
|
-
return (obj || new ClientTCPSocketSetEncoding()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
static getSizePrefixedRootAsClientTCPSocketSetEncoding(bb:flatbuffers.ByteBuffer, obj?:ClientTCPSocketSetEncoding):ClientTCPSocketSetEncoding {
|
|
24
|
-
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
25
|
-
return (obj || new ClientTCPSocketSetEncoding()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
type():ClientPacketType {
|
|
29
|
-
const offset = this.bb!.__offset(this.bb_pos, 4);
|
|
30
|
-
return offset ? this.bb!.readInt8(this.bb_pos + offset) : ClientPacketType.TCPSocket;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
encoding():string|null
|
|
34
|
-
encoding(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
|
35
|
-
encoding(optionalEncoding?:any):string|Uint8Array|null {
|
|
36
|
-
const offset = this.bb!.__offset(this.bb_pos, 6);
|
|
37
|
-
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
static startClientTCPSocketSetEncoding(builder:flatbuffers.Builder) {
|
|
41
|
-
builder.startObject(2);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
static addType(builder:flatbuffers.Builder, type:ClientPacketType) {
|
|
45
|
-
builder.addFieldInt8(0, type, ClientPacketType.TCPSocket);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
static addEncoding(builder:flatbuffers.Builder, encodingOffset:flatbuffers.Offset) {
|
|
49
|
-
builder.addFieldOffset(1, encodingOffset, 0);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
static endClientTCPSocketSetEncoding(builder:flatbuffers.Builder):flatbuffers.Offset {
|
|
53
|
-
const offset = builder.endObject();
|
|
54
|
-
return offset;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
static createClientTCPSocketSetEncoding(builder:flatbuffers.Builder, type:ClientPacketType, encodingOffset:flatbuffers.Offset):flatbuffers.Offset {
|
|
58
|
-
ClientTCPSocketSetEncoding.startClientTCPSocketSetEncoding(builder);
|
|
59
|
-
ClientTCPSocketSetEncoding.addType(builder, type);
|
|
60
|
-
ClientTCPSocketSetEncoding.addEncoding(builder, encodingOffset);
|
|
61
|
-
return ClientTCPSocketSetEncoding.endClientTCPSocketSetEncoding(builder);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
unpack(): ClientTCPSocketSetEncodingT {
|
|
65
|
-
return new ClientTCPSocketSetEncodingT(
|
|
66
|
-
this.type(),
|
|
67
|
-
this.encoding()
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
unpackTo(_o: ClientTCPSocketSetEncodingT): void {
|
|
73
|
-
_o.type = this.type();
|
|
74
|
-
_o.encoding = this.encoding();
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export class ClientTCPSocketSetEncodingT implements flatbuffers.IGeneratedObject {
|
|
79
|
-
constructor(
|
|
80
|
-
public type: ClientPacketType = ClientPacketType.TCPSocket,
|
|
81
|
-
public encoding: string|Uint8Array|null = null
|
|
82
|
-
){}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
|
86
|
-
const encoding = (this.encoding !== null ? builder.createString(this.encoding!) : 0);
|
|
87
|
-
|
|
88
|
-
return ClientTCPSocketSetEncoding.createClientTCPSocketSetEncoding(builder,
|
|
89
|
-
this.type,
|
|
90
|
-
encoding
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
|
-
|
|
3
|
-
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
4
|
-
|
|
5
|
-
import * as flatbuffers from 'flatbuffers';
|
|
6
|
-
|
|
7
|
-
import { ClientPacketType } from './client-packet-type.js';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export class ClientTCPSocketSetKeepAlive implements flatbuffers.IUnpackableObject<ClientTCPSocketSetKeepAliveT> {
|
|
11
|
-
bb: flatbuffers.ByteBuffer|null = null;
|
|
12
|
-
bb_pos = 0;
|
|
13
|
-
__init(i:number, bb:flatbuffers.ByteBuffer):ClientTCPSocketSetKeepAlive {
|
|
14
|
-
this.bb_pos = i;
|
|
15
|
-
this.bb = bb;
|
|
16
|
-
return this;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
static getRootAsClientTCPSocketSetKeepAlive(bb:flatbuffers.ByteBuffer, obj?:ClientTCPSocketSetKeepAlive):ClientTCPSocketSetKeepAlive {
|
|
20
|
-
return (obj || new ClientTCPSocketSetKeepAlive()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
static getSizePrefixedRootAsClientTCPSocketSetKeepAlive(bb:flatbuffers.ByteBuffer, obj?:ClientTCPSocketSetKeepAlive):ClientTCPSocketSetKeepAlive {
|
|
24
|
-
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
25
|
-
return (obj || new ClientTCPSocketSetKeepAlive()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
type():ClientPacketType {
|
|
29
|
-
const offset = this.bb!.__offset(this.bb_pos, 4);
|
|
30
|
-
return offset ? this.bb!.readInt8(this.bb_pos + offset) : ClientPacketType.TCPSocket;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
enable():boolean {
|
|
34
|
-
const offset = this.bb!.__offset(this.bb_pos, 6);
|
|
35
|
-
return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
initialDelay():number {
|
|
39
|
-
const offset = this.bb!.__offset(this.bb_pos, 8);
|
|
40
|
-
return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
static startClientTCPSocketSetKeepAlive(builder:flatbuffers.Builder) {
|
|
44
|
-
builder.startObject(3);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
static addType(builder:flatbuffers.Builder, type:ClientPacketType) {
|
|
48
|
-
builder.addFieldInt8(0, type, ClientPacketType.TCPSocket);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
static addEnable(builder:flatbuffers.Builder, enable:boolean) {
|
|
52
|
-
builder.addFieldInt8(1, +enable, +false);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
static addInitialDelay(builder:flatbuffers.Builder, initialDelay:number) {
|
|
56
|
-
builder.addFieldFloat32(2, initialDelay, 0.0);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
static endClientTCPSocketSetKeepAlive(builder:flatbuffers.Builder):flatbuffers.Offset {
|
|
60
|
-
const offset = builder.endObject();
|
|
61
|
-
return offset;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
static createClientTCPSocketSetKeepAlive(builder:flatbuffers.Builder, type:ClientPacketType, enable:boolean, initialDelay:number):flatbuffers.Offset {
|
|
65
|
-
ClientTCPSocketSetKeepAlive.startClientTCPSocketSetKeepAlive(builder);
|
|
66
|
-
ClientTCPSocketSetKeepAlive.addType(builder, type);
|
|
67
|
-
ClientTCPSocketSetKeepAlive.addEnable(builder, enable);
|
|
68
|
-
ClientTCPSocketSetKeepAlive.addInitialDelay(builder, initialDelay);
|
|
69
|
-
return ClientTCPSocketSetKeepAlive.endClientTCPSocketSetKeepAlive(builder);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
unpack(): ClientTCPSocketSetKeepAliveT {
|
|
73
|
-
return new ClientTCPSocketSetKeepAliveT(
|
|
74
|
-
this.type(),
|
|
75
|
-
this.enable(),
|
|
76
|
-
this.initialDelay()
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
unpackTo(_o: ClientTCPSocketSetKeepAliveT): void {
|
|
82
|
-
_o.type = this.type();
|
|
83
|
-
_o.enable = this.enable();
|
|
84
|
-
_o.initialDelay = this.initialDelay();
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export class ClientTCPSocketSetKeepAliveT implements flatbuffers.IGeneratedObject {
|
|
89
|
-
constructor(
|
|
90
|
-
public type: ClientPacketType = ClientPacketType.TCPSocket,
|
|
91
|
-
public enable: boolean = false,
|
|
92
|
-
public initialDelay: number = 0.0
|
|
93
|
-
){}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
|
97
|
-
return ClientTCPSocketSetKeepAlive.createClientTCPSocketSetKeepAlive(builder,
|
|
98
|
-
this.type,
|
|
99
|
-
this.enable,
|
|
100
|
-
this.initialDelay
|
|
101
|
-
);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
|
-
|
|
3
|
-
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
4
|
-
|
|
5
|
-
import * as flatbuffers from 'flatbuffers';
|
|
6
|
-
|
|
7
|
-
import { ClientPacketType } from './client-packet-type.js';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export class ClientTCPSocketSetNoDelay implements flatbuffers.IUnpackableObject<ClientTCPSocketSetNoDelayT> {
|
|
11
|
-
bb: flatbuffers.ByteBuffer|null = null;
|
|
12
|
-
bb_pos = 0;
|
|
13
|
-
__init(i:number, bb:flatbuffers.ByteBuffer):ClientTCPSocketSetNoDelay {
|
|
14
|
-
this.bb_pos = i;
|
|
15
|
-
this.bb = bb;
|
|
16
|
-
return this;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
static getRootAsClientTCPSocketSetNoDelay(bb:flatbuffers.ByteBuffer, obj?:ClientTCPSocketSetNoDelay):ClientTCPSocketSetNoDelay {
|
|
20
|
-
return (obj || new ClientTCPSocketSetNoDelay()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
static getSizePrefixedRootAsClientTCPSocketSetNoDelay(bb:flatbuffers.ByteBuffer, obj?:ClientTCPSocketSetNoDelay):ClientTCPSocketSetNoDelay {
|
|
24
|
-
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
25
|
-
return (obj || new ClientTCPSocketSetNoDelay()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
type():ClientPacketType {
|
|
29
|
-
const offset = this.bb!.__offset(this.bb_pos, 4);
|
|
30
|
-
return offset ? this.bb!.readInt8(this.bb_pos + offset) : ClientPacketType.TCPSocket;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
enable():boolean {
|
|
34
|
-
const offset = this.bb!.__offset(this.bb_pos, 6);
|
|
35
|
-
return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
static startClientTCPSocketSetNoDelay(builder:flatbuffers.Builder) {
|
|
39
|
-
builder.startObject(2);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
static addType(builder:flatbuffers.Builder, type:ClientPacketType) {
|
|
43
|
-
builder.addFieldInt8(0, type, ClientPacketType.TCPSocket);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
static addEnable(builder:flatbuffers.Builder, enable:boolean) {
|
|
47
|
-
builder.addFieldInt8(1, +enable, +false);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
static endClientTCPSocketSetNoDelay(builder:flatbuffers.Builder):flatbuffers.Offset {
|
|
51
|
-
const offset = builder.endObject();
|
|
52
|
-
return offset;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
static createClientTCPSocketSetNoDelay(builder:flatbuffers.Builder, type:ClientPacketType, enable:boolean):flatbuffers.Offset {
|
|
56
|
-
ClientTCPSocketSetNoDelay.startClientTCPSocketSetNoDelay(builder);
|
|
57
|
-
ClientTCPSocketSetNoDelay.addType(builder, type);
|
|
58
|
-
ClientTCPSocketSetNoDelay.addEnable(builder, enable);
|
|
59
|
-
return ClientTCPSocketSetNoDelay.endClientTCPSocketSetNoDelay(builder);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
unpack(): ClientTCPSocketSetNoDelayT {
|
|
63
|
-
return new ClientTCPSocketSetNoDelayT(
|
|
64
|
-
this.type(),
|
|
65
|
-
this.enable()
|
|
66
|
-
);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
unpackTo(_o: ClientTCPSocketSetNoDelayT): void {
|
|
71
|
-
_o.type = this.type();
|
|
72
|
-
_o.enable = this.enable();
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export class ClientTCPSocketSetNoDelayT implements flatbuffers.IGeneratedObject {
|
|
77
|
-
constructor(
|
|
78
|
-
public type: ClientPacketType = ClientPacketType.TCPSocket,
|
|
79
|
-
public enable: boolean = false
|
|
80
|
-
){}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
|
84
|
-
return ClientTCPSocketSetNoDelay.createClientTCPSocketSetNoDelay(builder,
|
|
85
|
-
this.type,
|
|
86
|
-
this.enable
|
|
87
|
-
);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
|
-
|
|
3
|
-
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
4
|
-
|
|
5
|
-
import * as flatbuffers from 'flatbuffers';
|
|
6
|
-
|
|
7
|
-
import { ClientPacketType } from './client-packet-type.js';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export class ClientTCPSocketSetTimeout implements flatbuffers.IUnpackableObject<ClientTCPSocketSetTimeoutT> {
|
|
11
|
-
bb: flatbuffers.ByteBuffer|null = null;
|
|
12
|
-
bb_pos = 0;
|
|
13
|
-
__init(i:number, bb:flatbuffers.ByteBuffer):ClientTCPSocketSetTimeout {
|
|
14
|
-
this.bb_pos = i;
|
|
15
|
-
this.bb = bb;
|
|
16
|
-
return this;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
static getRootAsClientTCPSocketSetTimeout(bb:flatbuffers.ByteBuffer, obj?:ClientTCPSocketSetTimeout):ClientTCPSocketSetTimeout {
|
|
20
|
-
return (obj || new ClientTCPSocketSetTimeout()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
static getSizePrefixedRootAsClientTCPSocketSetTimeout(bb:flatbuffers.ByteBuffer, obj?:ClientTCPSocketSetTimeout):ClientTCPSocketSetTimeout {
|
|
24
|
-
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
25
|
-
return (obj || new ClientTCPSocketSetTimeout()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
type():ClientPacketType {
|
|
29
|
-
const offset = this.bb!.__offset(this.bb_pos, 4);
|
|
30
|
-
return offset ? this.bb!.readInt8(this.bb_pos + offset) : ClientPacketType.TCPSocket;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
uuid():string|null
|
|
34
|
-
uuid(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
|
35
|
-
uuid(optionalEncoding?:any):string|Uint8Array|null {
|
|
36
|
-
const offset = this.bb!.__offset(this.bb_pos, 6);
|
|
37
|
-
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
timeout():number {
|
|
41
|
-
const offset = this.bb!.__offset(this.bb_pos, 8);
|
|
42
|
-
return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
static startClientTCPSocketSetTimeout(builder:flatbuffers.Builder) {
|
|
46
|
-
builder.startObject(3);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
static addType(builder:flatbuffers.Builder, type:ClientPacketType) {
|
|
50
|
-
builder.addFieldInt8(0, type, ClientPacketType.TCPSocket);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
static addUuid(builder:flatbuffers.Builder, uuidOffset:flatbuffers.Offset) {
|
|
54
|
-
builder.addFieldOffset(1, uuidOffset, 0);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
static addTimeout(builder:flatbuffers.Builder, timeout:number) {
|
|
58
|
-
builder.addFieldFloat32(2, timeout, 0.0);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
static endClientTCPSocketSetTimeout(builder:flatbuffers.Builder):flatbuffers.Offset {
|
|
62
|
-
const offset = builder.endObject();
|
|
63
|
-
return offset;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
static createClientTCPSocketSetTimeout(builder:flatbuffers.Builder, type:ClientPacketType, uuidOffset:flatbuffers.Offset, timeout:number):flatbuffers.Offset {
|
|
67
|
-
ClientTCPSocketSetTimeout.startClientTCPSocketSetTimeout(builder);
|
|
68
|
-
ClientTCPSocketSetTimeout.addType(builder, type);
|
|
69
|
-
ClientTCPSocketSetTimeout.addUuid(builder, uuidOffset);
|
|
70
|
-
ClientTCPSocketSetTimeout.addTimeout(builder, timeout);
|
|
71
|
-
return ClientTCPSocketSetTimeout.endClientTCPSocketSetTimeout(builder);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
unpack(): ClientTCPSocketSetTimeoutT {
|
|
75
|
-
return new ClientTCPSocketSetTimeoutT(
|
|
76
|
-
this.type(),
|
|
77
|
-
this.uuid(),
|
|
78
|
-
this.timeout()
|
|
79
|
-
);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
unpackTo(_o: ClientTCPSocketSetTimeoutT): void {
|
|
84
|
-
_o.type = this.type();
|
|
85
|
-
_o.uuid = this.uuid();
|
|
86
|
-
_o.timeout = this.timeout();
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export class ClientTCPSocketSetTimeoutT implements flatbuffers.IGeneratedObject {
|
|
91
|
-
constructor(
|
|
92
|
-
public type: ClientPacketType = ClientPacketType.TCPSocket,
|
|
93
|
-
public uuid: string|Uint8Array|null = null,
|
|
94
|
-
public timeout: number = 0.0
|
|
95
|
-
){}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
|
99
|
-
const uuid = (this.uuid !== null ? builder.createString(this.uuid!) : 0);
|
|
100
|
-
|
|
101
|
-
return ClientTCPSocketSetTimeout.createClientTCPSocketSetTimeout(builder,
|
|
102
|
-
this.type,
|
|
103
|
-
uuid,
|
|
104
|
-
this.timeout
|
|
105
|
-
);
|
|
106
|
-
}
|
|
107
|
-
}
|