@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,172 +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 { ServerPacketType } from './server-packet-type.js';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export class ServerTCPSocketEventConnect implements flatbuffers.IUnpackableObject<ServerTCPSocketEventConnectT> {
|
|
11
|
-
bb: flatbuffers.ByteBuffer|null = null;
|
|
12
|
-
bb_pos = 0;
|
|
13
|
-
__init(i:number, bb:flatbuffers.ByteBuffer):ServerTCPSocketEventConnect {
|
|
14
|
-
this.bb_pos = i;
|
|
15
|
-
this.bb = bb;
|
|
16
|
-
return this;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
static getRootAsServerTCPSocketEventConnect(bb:flatbuffers.ByteBuffer, obj?:ServerTCPSocketEventConnect):ServerTCPSocketEventConnect {
|
|
20
|
-
return (obj || new ServerTCPSocketEventConnect()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
static getSizePrefixedRootAsServerTCPSocketEventConnect(bb:flatbuffers.ByteBuffer, obj?:ServerTCPSocketEventConnect):ServerTCPSocketEventConnect {
|
|
24
|
-
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
25
|
-
return (obj || new ServerTCPSocketEventConnect()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
type():ServerPacketType {
|
|
29
|
-
const offset = this.bb!.__offset(this.bb_pos, 4);
|
|
30
|
-
return offset ? this.bb!.readInt8(this.bb_pos + offset) : ServerPacketType.TCPSocketEventClose;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
localAddress():string|null
|
|
34
|
-
localAddress(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
|
35
|
-
localAddress(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
|
-
localPort():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
|
-
localFamily():string|null
|
|
46
|
-
localFamily(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
|
47
|
-
localFamily(optionalEncoding?:any):string|Uint8Array|null {
|
|
48
|
-
const offset = this.bb!.__offset(this.bb_pos, 10);
|
|
49
|
-
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
remoteAddress():string|null
|
|
53
|
-
remoteAddress(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
|
54
|
-
remoteAddress(optionalEncoding?:any):string|Uint8Array|null {
|
|
55
|
-
const offset = this.bb!.__offset(this.bb_pos, 12);
|
|
56
|
-
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
remotePort():number {
|
|
60
|
-
const offset = this.bb!.__offset(this.bb_pos, 14);
|
|
61
|
-
return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
remoteFamily():string|null
|
|
65
|
-
remoteFamily(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
|
66
|
-
remoteFamily(optionalEncoding?:any):string|Uint8Array|null {
|
|
67
|
-
const offset = this.bb!.__offset(this.bb_pos, 16);
|
|
68
|
-
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
static startServerTCPSocketEventConnect(builder:flatbuffers.Builder) {
|
|
72
|
-
builder.startObject(7);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
static addType(builder:flatbuffers.Builder, type:ServerPacketType) {
|
|
76
|
-
builder.addFieldInt8(0, type, ServerPacketType.TCPSocketEventClose);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
static addLocalAddress(builder:flatbuffers.Builder, localAddressOffset:flatbuffers.Offset) {
|
|
80
|
-
builder.addFieldOffset(1, localAddressOffset, 0);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
static addLocalPort(builder:flatbuffers.Builder, localPort:number) {
|
|
84
|
-
builder.addFieldFloat32(2, localPort, 0.0);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
static addLocalFamily(builder:flatbuffers.Builder, localFamilyOffset:flatbuffers.Offset) {
|
|
88
|
-
builder.addFieldOffset(3, localFamilyOffset, 0);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
static addRemoteAddress(builder:flatbuffers.Builder, remoteAddressOffset:flatbuffers.Offset) {
|
|
92
|
-
builder.addFieldOffset(4, remoteAddressOffset, 0);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
static addRemotePort(builder:flatbuffers.Builder, remotePort:number) {
|
|
96
|
-
builder.addFieldFloat32(5, remotePort, 0.0);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
static addRemoteFamily(builder:flatbuffers.Builder, remoteFamilyOffset:flatbuffers.Offset) {
|
|
100
|
-
builder.addFieldOffset(6, remoteFamilyOffset, 0);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
static endServerTCPSocketEventConnect(builder:flatbuffers.Builder):flatbuffers.Offset {
|
|
104
|
-
const offset = builder.endObject();
|
|
105
|
-
return offset;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
static createServerTCPSocketEventConnect(builder:flatbuffers.Builder, type:ServerPacketType, localAddressOffset:flatbuffers.Offset, localPort:number, localFamilyOffset:flatbuffers.Offset, remoteAddressOffset:flatbuffers.Offset, remotePort:number, remoteFamilyOffset:flatbuffers.Offset):flatbuffers.Offset {
|
|
109
|
-
ServerTCPSocketEventConnect.startServerTCPSocketEventConnect(builder);
|
|
110
|
-
ServerTCPSocketEventConnect.addType(builder, type);
|
|
111
|
-
ServerTCPSocketEventConnect.addLocalAddress(builder, localAddressOffset);
|
|
112
|
-
ServerTCPSocketEventConnect.addLocalPort(builder, localPort);
|
|
113
|
-
ServerTCPSocketEventConnect.addLocalFamily(builder, localFamilyOffset);
|
|
114
|
-
ServerTCPSocketEventConnect.addRemoteAddress(builder, remoteAddressOffset);
|
|
115
|
-
ServerTCPSocketEventConnect.addRemotePort(builder, remotePort);
|
|
116
|
-
ServerTCPSocketEventConnect.addRemoteFamily(builder, remoteFamilyOffset);
|
|
117
|
-
return ServerTCPSocketEventConnect.endServerTCPSocketEventConnect(builder);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
unpack(): ServerTCPSocketEventConnectT {
|
|
121
|
-
return new ServerTCPSocketEventConnectT(
|
|
122
|
-
this.type(),
|
|
123
|
-
this.localAddress(),
|
|
124
|
-
this.localPort(),
|
|
125
|
-
this.localFamily(),
|
|
126
|
-
this.remoteAddress(),
|
|
127
|
-
this.remotePort(),
|
|
128
|
-
this.remoteFamily()
|
|
129
|
-
);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
unpackTo(_o: ServerTCPSocketEventConnectT): void {
|
|
134
|
-
_o.type = this.type();
|
|
135
|
-
_o.localAddress = this.localAddress();
|
|
136
|
-
_o.localPort = this.localPort();
|
|
137
|
-
_o.localFamily = this.localFamily();
|
|
138
|
-
_o.remoteAddress = this.remoteAddress();
|
|
139
|
-
_o.remotePort = this.remotePort();
|
|
140
|
-
_o.remoteFamily = this.remoteFamily();
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
export class ServerTCPSocketEventConnectT implements flatbuffers.IGeneratedObject {
|
|
145
|
-
constructor(
|
|
146
|
-
public type: ServerPacketType = ServerPacketType.TCPSocketEventClose,
|
|
147
|
-
public localAddress: string|Uint8Array|null = null,
|
|
148
|
-
public localPort: number = 0.0,
|
|
149
|
-
public localFamily: string|Uint8Array|null = null,
|
|
150
|
-
public remoteAddress: string|Uint8Array|null = null,
|
|
151
|
-
public remotePort: number = 0.0,
|
|
152
|
-
public remoteFamily: string|Uint8Array|null = null
|
|
153
|
-
){}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
|
157
|
-
const localAddress = (this.localAddress !== null ? builder.createString(this.localAddress!) : 0);
|
|
158
|
-
const localFamily = (this.localFamily !== null ? builder.createString(this.localFamily!) : 0);
|
|
159
|
-
const remoteAddress = (this.remoteAddress !== null ? builder.createString(this.remoteAddress!) : 0);
|
|
160
|
-
const remoteFamily = (this.remoteFamily !== null ? builder.createString(this.remoteFamily!) : 0);
|
|
161
|
-
|
|
162
|
-
return ServerTCPSocketEventConnect.createServerTCPSocketEventConnect(builder,
|
|
163
|
-
this.type,
|
|
164
|
-
localAddress,
|
|
165
|
-
this.localPort,
|
|
166
|
-
localFamily,
|
|
167
|
-
remoteAddress,
|
|
168
|
-
this.remotePort,
|
|
169
|
-
remoteFamily
|
|
170
|
-
);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
@@ -1,138 +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 { ServerPacketType } from './server-packet-type.js';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export class ServerTCPSocketEventConnectionAttemptFailed implements flatbuffers.IUnpackableObject<ServerTCPSocketEventConnectionAttemptFailedT> {
|
|
11
|
-
bb: flatbuffers.ByteBuffer|null = null;
|
|
12
|
-
bb_pos = 0;
|
|
13
|
-
__init(i:number, bb:flatbuffers.ByteBuffer):ServerTCPSocketEventConnectionAttemptFailed {
|
|
14
|
-
this.bb_pos = i;
|
|
15
|
-
this.bb = bb;
|
|
16
|
-
return this;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
static getRootAsServerTCPSocketEventConnectionAttemptFailed(bb:flatbuffers.ByteBuffer, obj?:ServerTCPSocketEventConnectionAttemptFailed):ServerTCPSocketEventConnectionAttemptFailed {
|
|
20
|
-
return (obj || new ServerTCPSocketEventConnectionAttemptFailed()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
static getSizePrefixedRootAsServerTCPSocketEventConnectionAttemptFailed(bb:flatbuffers.ByteBuffer, obj?:ServerTCPSocketEventConnectionAttemptFailed):ServerTCPSocketEventConnectionAttemptFailed {
|
|
24
|
-
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
25
|
-
return (obj || new ServerTCPSocketEventConnectionAttemptFailed()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
type():ServerPacketType {
|
|
29
|
-
const offset = this.bb!.__offset(this.bb_pos, 4);
|
|
30
|
-
return offset ? this.bb!.readInt8(this.bb_pos + offset) : ServerPacketType.TCPSocketEventClose;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
ip():string|null
|
|
34
|
-
ip(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
|
35
|
-
ip(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
|
-
port():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
|
-
family():number {
|
|
46
|
-
const offset = this.bb!.__offset(this.bb_pos, 10);
|
|
47
|
-
return offset ? this.bb!.readInt8(this.bb_pos + offset) : 0;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
error():string|null
|
|
51
|
-
error(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
|
52
|
-
error(optionalEncoding?:any):string|Uint8Array|null {
|
|
53
|
-
const offset = this.bb!.__offset(this.bb_pos, 12);
|
|
54
|
-
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
static startServerTCPSocketEventConnectionAttemptFailed(builder:flatbuffers.Builder) {
|
|
58
|
-
builder.startObject(5);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
static addType(builder:flatbuffers.Builder, type:ServerPacketType) {
|
|
62
|
-
builder.addFieldInt8(0, type, ServerPacketType.TCPSocketEventClose);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
static addIp(builder:flatbuffers.Builder, ipOffset:flatbuffers.Offset) {
|
|
66
|
-
builder.addFieldOffset(1, ipOffset, 0);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
static addPort(builder:flatbuffers.Builder, port:number) {
|
|
70
|
-
builder.addFieldFloat32(2, port, 0.0);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
static addFamily(builder:flatbuffers.Builder, family:number) {
|
|
74
|
-
builder.addFieldInt8(3, family, 0);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
static addError(builder:flatbuffers.Builder, errorOffset:flatbuffers.Offset) {
|
|
78
|
-
builder.addFieldOffset(4, errorOffset, 0);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
static endServerTCPSocketEventConnectionAttemptFailed(builder:flatbuffers.Builder):flatbuffers.Offset {
|
|
82
|
-
const offset = builder.endObject();
|
|
83
|
-
return offset;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
static createServerTCPSocketEventConnectionAttemptFailed(builder:flatbuffers.Builder, type:ServerPacketType, ipOffset:flatbuffers.Offset, port:number, family:number, errorOffset:flatbuffers.Offset):flatbuffers.Offset {
|
|
87
|
-
ServerTCPSocketEventConnectionAttemptFailed.startServerTCPSocketEventConnectionAttemptFailed(builder);
|
|
88
|
-
ServerTCPSocketEventConnectionAttemptFailed.addType(builder, type);
|
|
89
|
-
ServerTCPSocketEventConnectionAttemptFailed.addIp(builder, ipOffset);
|
|
90
|
-
ServerTCPSocketEventConnectionAttemptFailed.addPort(builder, port);
|
|
91
|
-
ServerTCPSocketEventConnectionAttemptFailed.addFamily(builder, family);
|
|
92
|
-
ServerTCPSocketEventConnectionAttemptFailed.addError(builder, errorOffset);
|
|
93
|
-
return ServerTCPSocketEventConnectionAttemptFailed.endServerTCPSocketEventConnectionAttemptFailed(builder);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
unpack(): ServerTCPSocketEventConnectionAttemptFailedT {
|
|
97
|
-
return new ServerTCPSocketEventConnectionAttemptFailedT(
|
|
98
|
-
this.type(),
|
|
99
|
-
this.ip(),
|
|
100
|
-
this.port(),
|
|
101
|
-
this.family(),
|
|
102
|
-
this.error()
|
|
103
|
-
);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
unpackTo(_o: ServerTCPSocketEventConnectionAttemptFailedT): void {
|
|
108
|
-
_o.type = this.type();
|
|
109
|
-
_o.ip = this.ip();
|
|
110
|
-
_o.port = this.port();
|
|
111
|
-
_o.family = this.family();
|
|
112
|
-
_o.error = this.error();
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
export class ServerTCPSocketEventConnectionAttemptFailedT implements flatbuffers.IGeneratedObject {
|
|
117
|
-
constructor(
|
|
118
|
-
public type: ServerPacketType = ServerPacketType.TCPSocketEventClose,
|
|
119
|
-
public ip: string|Uint8Array|null = null,
|
|
120
|
-
public port: number = 0.0,
|
|
121
|
-
public family: number = 0,
|
|
122
|
-
public error: string|Uint8Array|null = null
|
|
123
|
-
){}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
|
127
|
-
const ip = (this.ip !== null ? builder.createString(this.ip!) : 0);
|
|
128
|
-
const error = (this.error !== null ? builder.createString(this.error!) : 0);
|
|
129
|
-
|
|
130
|
-
return ServerTCPSocketEventConnectionAttemptFailed.createServerTCPSocketEventConnectionAttemptFailed(builder,
|
|
131
|
-
this.type,
|
|
132
|
-
ip,
|
|
133
|
-
this.port,
|
|
134
|
-
this.family,
|
|
135
|
-
error
|
|
136
|
-
);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
@@ -1,121 +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 { ServerPacketType } from './server-packet-type.js';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export class ServerTCPSocketEventConnectionAttemptTimeout implements flatbuffers.IUnpackableObject<ServerTCPSocketEventConnectionAttemptTimeoutT> {
|
|
11
|
-
bb: flatbuffers.ByteBuffer|null = null;
|
|
12
|
-
bb_pos = 0;
|
|
13
|
-
__init(i:number, bb:flatbuffers.ByteBuffer):ServerTCPSocketEventConnectionAttemptTimeout {
|
|
14
|
-
this.bb_pos = i;
|
|
15
|
-
this.bb = bb;
|
|
16
|
-
return this;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
static getRootAsServerTCPSocketEventConnectionAttemptTimeout(bb:flatbuffers.ByteBuffer, obj?:ServerTCPSocketEventConnectionAttemptTimeout):ServerTCPSocketEventConnectionAttemptTimeout {
|
|
20
|
-
return (obj || new ServerTCPSocketEventConnectionAttemptTimeout()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
static getSizePrefixedRootAsServerTCPSocketEventConnectionAttemptTimeout(bb:flatbuffers.ByteBuffer, obj?:ServerTCPSocketEventConnectionAttemptTimeout):ServerTCPSocketEventConnectionAttemptTimeout {
|
|
24
|
-
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
25
|
-
return (obj || new ServerTCPSocketEventConnectionAttemptTimeout()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
type():ServerPacketType {
|
|
29
|
-
const offset = this.bb!.__offset(this.bb_pos, 4);
|
|
30
|
-
return offset ? this.bb!.readInt8(this.bb_pos + offset) : ServerPacketType.TCPSocketEventClose;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
ip():string|null
|
|
34
|
-
ip(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
|
35
|
-
ip(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
|
-
port():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
|
-
family():number {
|
|
46
|
-
const offset = this.bb!.__offset(this.bb_pos, 10);
|
|
47
|
-
return offset ? this.bb!.readInt8(this.bb_pos + offset) : 0;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
static startServerTCPSocketEventConnectionAttemptTimeout(builder:flatbuffers.Builder) {
|
|
51
|
-
builder.startObject(4);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
static addType(builder:flatbuffers.Builder, type:ServerPacketType) {
|
|
55
|
-
builder.addFieldInt8(0, type, ServerPacketType.TCPSocketEventClose);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
static addIp(builder:flatbuffers.Builder, ipOffset:flatbuffers.Offset) {
|
|
59
|
-
builder.addFieldOffset(1, ipOffset, 0);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
static addPort(builder:flatbuffers.Builder, port:number) {
|
|
63
|
-
builder.addFieldFloat32(2, port, 0.0);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
static addFamily(builder:flatbuffers.Builder, family:number) {
|
|
67
|
-
builder.addFieldInt8(3, family, 0);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
static endServerTCPSocketEventConnectionAttemptTimeout(builder:flatbuffers.Builder):flatbuffers.Offset {
|
|
71
|
-
const offset = builder.endObject();
|
|
72
|
-
return offset;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
static createServerTCPSocketEventConnectionAttemptTimeout(builder:flatbuffers.Builder, type:ServerPacketType, ipOffset:flatbuffers.Offset, port:number, family:number):flatbuffers.Offset {
|
|
76
|
-
ServerTCPSocketEventConnectionAttemptTimeout.startServerTCPSocketEventConnectionAttemptTimeout(builder);
|
|
77
|
-
ServerTCPSocketEventConnectionAttemptTimeout.addType(builder, type);
|
|
78
|
-
ServerTCPSocketEventConnectionAttemptTimeout.addIp(builder, ipOffset);
|
|
79
|
-
ServerTCPSocketEventConnectionAttemptTimeout.addPort(builder, port);
|
|
80
|
-
ServerTCPSocketEventConnectionAttemptTimeout.addFamily(builder, family);
|
|
81
|
-
return ServerTCPSocketEventConnectionAttemptTimeout.endServerTCPSocketEventConnectionAttemptTimeout(builder);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
unpack(): ServerTCPSocketEventConnectionAttemptTimeoutT {
|
|
85
|
-
return new ServerTCPSocketEventConnectionAttemptTimeoutT(
|
|
86
|
-
this.type(),
|
|
87
|
-
this.ip(),
|
|
88
|
-
this.port(),
|
|
89
|
-
this.family()
|
|
90
|
-
);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
unpackTo(_o: ServerTCPSocketEventConnectionAttemptTimeoutT): void {
|
|
95
|
-
_o.type = this.type();
|
|
96
|
-
_o.ip = this.ip();
|
|
97
|
-
_o.port = this.port();
|
|
98
|
-
_o.family = this.family();
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export class ServerTCPSocketEventConnectionAttemptTimeoutT implements flatbuffers.IGeneratedObject {
|
|
103
|
-
constructor(
|
|
104
|
-
public type: ServerPacketType = ServerPacketType.TCPSocketEventClose,
|
|
105
|
-
public ip: string|Uint8Array|null = null,
|
|
106
|
-
public port: number = 0.0,
|
|
107
|
-
public family: number = 0
|
|
108
|
-
){}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
|
112
|
-
const ip = (this.ip !== null ? builder.createString(this.ip!) : 0);
|
|
113
|
-
|
|
114
|
-
return ServerTCPSocketEventConnectionAttemptTimeout.createServerTCPSocketEventConnectionAttemptTimeout(builder,
|
|
115
|
-
this.type,
|
|
116
|
-
ip,
|
|
117
|
-
this.port,
|
|
118
|
-
this.family
|
|
119
|
-
);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
@@ -1,121 +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 { ServerPacketType } from './server-packet-type.js';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export class ServerTCPSocketEventConnectionAttempt implements flatbuffers.IUnpackableObject<ServerTCPSocketEventConnectionAttemptT> {
|
|
11
|
-
bb: flatbuffers.ByteBuffer|null = null;
|
|
12
|
-
bb_pos = 0;
|
|
13
|
-
__init(i:number, bb:flatbuffers.ByteBuffer):ServerTCPSocketEventConnectionAttempt {
|
|
14
|
-
this.bb_pos = i;
|
|
15
|
-
this.bb = bb;
|
|
16
|
-
return this;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
static getRootAsServerTCPSocketEventConnectionAttempt(bb:flatbuffers.ByteBuffer, obj?:ServerTCPSocketEventConnectionAttempt):ServerTCPSocketEventConnectionAttempt {
|
|
20
|
-
return (obj || new ServerTCPSocketEventConnectionAttempt()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
static getSizePrefixedRootAsServerTCPSocketEventConnectionAttempt(bb:flatbuffers.ByteBuffer, obj?:ServerTCPSocketEventConnectionAttempt):ServerTCPSocketEventConnectionAttempt {
|
|
24
|
-
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
25
|
-
return (obj || new ServerTCPSocketEventConnectionAttempt()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
type():ServerPacketType {
|
|
29
|
-
const offset = this.bb!.__offset(this.bb_pos, 4);
|
|
30
|
-
return offset ? this.bb!.readInt8(this.bb_pos + offset) : ServerPacketType.TCPSocketEventClose;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
ip():string|null
|
|
34
|
-
ip(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
|
35
|
-
ip(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
|
-
port():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
|
-
family():number {
|
|
46
|
-
const offset = this.bb!.__offset(this.bb_pos, 10);
|
|
47
|
-
return offset ? this.bb!.readInt8(this.bb_pos + offset) : 0;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
static startServerTCPSocketEventConnectionAttempt(builder:flatbuffers.Builder) {
|
|
51
|
-
builder.startObject(4);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
static addType(builder:flatbuffers.Builder, type:ServerPacketType) {
|
|
55
|
-
builder.addFieldInt8(0, type, ServerPacketType.TCPSocketEventClose);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
static addIp(builder:flatbuffers.Builder, ipOffset:flatbuffers.Offset) {
|
|
59
|
-
builder.addFieldOffset(1, ipOffset, 0);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
static addPort(builder:flatbuffers.Builder, port:number) {
|
|
63
|
-
builder.addFieldFloat32(2, port, 0.0);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
static addFamily(builder:flatbuffers.Builder, family:number) {
|
|
67
|
-
builder.addFieldInt8(3, family, 0);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
static endServerTCPSocketEventConnectionAttempt(builder:flatbuffers.Builder):flatbuffers.Offset {
|
|
71
|
-
const offset = builder.endObject();
|
|
72
|
-
return offset;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
static createServerTCPSocketEventConnectionAttempt(builder:flatbuffers.Builder, type:ServerPacketType, ipOffset:flatbuffers.Offset, port:number, family:number):flatbuffers.Offset {
|
|
76
|
-
ServerTCPSocketEventConnectionAttempt.startServerTCPSocketEventConnectionAttempt(builder);
|
|
77
|
-
ServerTCPSocketEventConnectionAttempt.addType(builder, type);
|
|
78
|
-
ServerTCPSocketEventConnectionAttempt.addIp(builder, ipOffset);
|
|
79
|
-
ServerTCPSocketEventConnectionAttempt.addPort(builder, port);
|
|
80
|
-
ServerTCPSocketEventConnectionAttempt.addFamily(builder, family);
|
|
81
|
-
return ServerTCPSocketEventConnectionAttempt.endServerTCPSocketEventConnectionAttempt(builder);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
unpack(): ServerTCPSocketEventConnectionAttemptT {
|
|
85
|
-
return new ServerTCPSocketEventConnectionAttemptT(
|
|
86
|
-
this.type(),
|
|
87
|
-
this.ip(),
|
|
88
|
-
this.port(),
|
|
89
|
-
this.family()
|
|
90
|
-
);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
unpackTo(_o: ServerTCPSocketEventConnectionAttemptT): void {
|
|
95
|
-
_o.type = this.type();
|
|
96
|
-
_o.ip = this.ip();
|
|
97
|
-
_o.port = this.port();
|
|
98
|
-
_o.family = this.family();
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export class ServerTCPSocketEventConnectionAttemptT implements flatbuffers.IGeneratedObject {
|
|
103
|
-
constructor(
|
|
104
|
-
public type: ServerPacketType = ServerPacketType.TCPSocketEventClose,
|
|
105
|
-
public ip: string|Uint8Array|null = null,
|
|
106
|
-
public port: number = 0.0,
|
|
107
|
-
public family: number = 0
|
|
108
|
-
){}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
|
112
|
-
const ip = (this.ip !== null ? builder.createString(this.ip!) : 0);
|
|
113
|
-
|
|
114
|
-
return ServerTCPSocketEventConnectionAttempt.createServerTCPSocketEventConnectionAttempt(builder,
|
|
115
|
-
this.type,
|
|
116
|
-
ip,
|
|
117
|
-
this.port,
|
|
118
|
-
this.family
|
|
119
|
-
);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
@@ -1,113 +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 { ServerPacketType } from './server-packet-type.js';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export class ServerTCPSocketEventData implements flatbuffers.IUnpackableObject<ServerTCPSocketEventDataT> {
|
|
11
|
-
bb: flatbuffers.ByteBuffer|null = null;
|
|
12
|
-
bb_pos = 0;
|
|
13
|
-
__init(i:number, bb:flatbuffers.ByteBuffer):ServerTCPSocketEventData {
|
|
14
|
-
this.bb_pos = i;
|
|
15
|
-
this.bb = bb;
|
|
16
|
-
return this;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
static getRootAsServerTCPSocketEventData(bb:flatbuffers.ByteBuffer, obj?:ServerTCPSocketEventData):ServerTCPSocketEventData {
|
|
20
|
-
return (obj || new ServerTCPSocketEventData()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
static getSizePrefixedRootAsServerTCPSocketEventData(bb:flatbuffers.ByteBuffer, obj?:ServerTCPSocketEventData):ServerTCPSocketEventData {
|
|
24
|
-
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
25
|
-
return (obj || new ServerTCPSocketEventData()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
type():ServerPacketType {
|
|
29
|
-
const offset = this.bb!.__offset(this.bb_pos, 4);
|
|
30
|
-
return offset ? this.bb!.readInt8(this.bb_pos + offset) : ServerPacketType.TCPSocketEventClose;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
data(index: number):number|null {
|
|
34
|
-
const offset = this.bb!.__offset(this.bb_pos, 6);
|
|
35
|
-
return offset ? this.bb!.readUint8(this.bb!.__vector(this.bb_pos + offset) + index) : 0;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
dataLength():number {
|
|
39
|
-
const offset = this.bb!.__offset(this.bb_pos, 6);
|
|
40
|
-
return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
dataArray():Uint8Array|null {
|
|
44
|
-
const offset = this.bb!.__offset(this.bb_pos, 6);
|
|
45
|
-
return offset ? new Uint8Array(this.bb!.bytes().buffer, this.bb!.bytes().byteOffset + this.bb!.__vector(this.bb_pos + offset), this.bb!.__vector_len(this.bb_pos + offset)) : null;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
static startServerTCPSocketEventData(builder:flatbuffers.Builder) {
|
|
49
|
-
builder.startObject(2);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
static addType(builder:flatbuffers.Builder, type:ServerPacketType) {
|
|
53
|
-
builder.addFieldInt8(0, type, ServerPacketType.TCPSocketEventClose);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
static addData(builder:flatbuffers.Builder, dataOffset:flatbuffers.Offset) {
|
|
57
|
-
builder.addFieldOffset(1, dataOffset, 0);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
static createDataVector(builder:flatbuffers.Builder, data:number[]|Uint8Array):flatbuffers.Offset {
|
|
61
|
-
builder.startVector(1, data.length, 1);
|
|
62
|
-
for (let i = data.length - 1; i >= 0; i--) {
|
|
63
|
-
builder.addInt8(data[i]!);
|
|
64
|
-
}
|
|
65
|
-
return builder.endVector();
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
static startDataVector(builder:flatbuffers.Builder, numElems:number) {
|
|
69
|
-
builder.startVector(1, numElems, 1);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
static endServerTCPSocketEventData(builder:flatbuffers.Builder):flatbuffers.Offset {
|
|
73
|
-
const offset = builder.endObject();
|
|
74
|
-
return offset;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
static createServerTCPSocketEventData(builder:flatbuffers.Builder, type:ServerPacketType, dataOffset:flatbuffers.Offset):flatbuffers.Offset {
|
|
78
|
-
ServerTCPSocketEventData.startServerTCPSocketEventData(builder);
|
|
79
|
-
ServerTCPSocketEventData.addType(builder, type);
|
|
80
|
-
ServerTCPSocketEventData.addData(builder, dataOffset);
|
|
81
|
-
return ServerTCPSocketEventData.endServerTCPSocketEventData(builder);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
unpack(): ServerTCPSocketEventDataT {
|
|
85
|
-
return new ServerTCPSocketEventDataT(
|
|
86
|
-
this.type(),
|
|
87
|
-
this.bb!.createScalarList<number>(this.data.bind(this), this.dataLength())
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
unpackTo(_o: ServerTCPSocketEventDataT): void {
|
|
93
|
-
_o.type = this.type();
|
|
94
|
-
_o.data = this.bb!.createScalarList<number>(this.data.bind(this), this.dataLength());
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export class ServerTCPSocketEventDataT implements flatbuffers.IGeneratedObject {
|
|
99
|
-
constructor(
|
|
100
|
-
public type: ServerPacketType = ServerPacketType.TCPSocketEventClose,
|
|
101
|
-
public data: (number)[] = []
|
|
102
|
-
){}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
|
106
|
-
const data = ServerTCPSocketEventData.createDataVector(builder, this.data);
|
|
107
|
-
|
|
108
|
-
return ServerTCPSocketEventData.createServerTCPSocketEventData(builder,
|
|
109
|
-
this.type,
|
|
110
|
-
data
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
}
|