@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,162 +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 { ClientTCPServer, ClientTCPServerT } from './client-tcpserver.js';
|
|
6
|
-
import { ClientTCPServerClose, ClientTCPServerCloseT } from './client-tcpserver-close.js';
|
|
7
|
-
import { ClientTCPServerGetConnections, ClientTCPServerGetConnectionsT } from './client-tcpserver-get-connections.js';
|
|
8
|
-
import { ClientTCPServerListen, ClientTCPServerListenT } from './client-tcpserver-listen.js';
|
|
9
|
-
import { ClientTCPSocket, ClientTCPSocketT } from './client-tcpsocket.js';
|
|
10
|
-
import { ClientTCPSocketConnect, ClientTCPSocketConnectT } from './client-tcpsocket-connect.js';
|
|
11
|
-
import { ClientTCPSocketDestroy, ClientTCPSocketDestroyT } from './client-tcpsocket-destroy.js';
|
|
12
|
-
import { ClientTCPSocketDestroySoon, ClientTCPSocketDestroySoonT } from './client-tcpsocket-destroy-soon.js';
|
|
13
|
-
import { ClientTCPSocketEnd, ClientTCPSocketEndT } from './client-tcpsocket-end.js';
|
|
14
|
-
import { ClientTCPSocketPause, ClientTCPSocketPauseT } from './client-tcpsocket-pause.js';
|
|
15
|
-
import { ClientTCPSocketResetAndDestroy, ClientTCPSocketResetAndDestroyT } from './client-tcpsocket-reset-and-destroy.js';
|
|
16
|
-
import { ClientTCPSocketResume, ClientTCPSocketResumeT } from './client-tcpsocket-resume.js';
|
|
17
|
-
import { ClientTCPSocketSetEncoding, ClientTCPSocketSetEncodingT } from './client-tcpsocket-set-encoding.js';
|
|
18
|
-
import { ClientTCPSocketSetKeepAlive, ClientTCPSocketSetKeepAliveT } from './client-tcpsocket-set-keep-alive.js';
|
|
19
|
-
import { ClientTCPSocketSetNoDelay, ClientTCPSocketSetNoDelayT } from './client-tcpsocket-set-no-delay.js';
|
|
20
|
-
import { ClientTCPSocketSetTimeout, ClientTCPSocketSetTimeoutT } from './client-tcpsocket-set-timeout.js';
|
|
21
|
-
import { ClientTCPSocketWrite, ClientTCPSocketWriteT } from './client-tcpsocket-write.js';
|
|
22
|
-
import { ClientUDPSocket, ClientUDPSocketT } from './client-udpsocket.js';
|
|
23
|
-
import { ClientUDPSocketAddMembership, ClientUDPSocketAddMembershipT } from './client-udpsocket-add-membership.js';
|
|
24
|
-
import { ClientUDPSocketAddSourceSpecificMembership, ClientUDPSocketAddSourceSpecificMembershipT } from './client-udpsocket-add-source-specific-membership.js';
|
|
25
|
-
import { ClientUDPSocketBind, ClientUDPSocketBindT } from './client-udpsocket-bind.js';
|
|
26
|
-
import { ClientUDPSocketClose, ClientUDPSocketCloseT } from './client-udpsocket-close.js';
|
|
27
|
-
import { ClientUDPSocketDisconnect, ClientUDPSocketDisconnectT } from './client-udpsocket-disconnect.js';
|
|
28
|
-
import { ClientUDPSocketDropMembership, ClientUDPSocketDropMembershipT } from './client-udpsocket-drop-membership.js';
|
|
29
|
-
import { ClientUDPSocketDropSourceSpecificMembership, ClientUDPSocketDropSourceSpecificMembershipT } from './client-udpsocket-drop-source-specific-membership.js';
|
|
30
|
-
import { ClientUDPSocketSend, ClientUDPSocketSendT } from './client-udpsocket-send.js';
|
|
31
|
-
import { ClientUDPSocketSetBroadcast, ClientUDPSocketSetBroadcastT } from './client-udpsocket-set-broadcast.js';
|
|
32
|
-
import { ClientUDPSocketSetMulticastInterface, ClientUDPSocketSetMulticastInterfaceT } from './client-udpsocket-set-multicast-interface.js';
|
|
33
|
-
import { ClientUDPSocketSetMulticastLoopback, ClientUDPSocketSetMulticastLoopbackT } from './client-udpsocket-set-multicast-loopback.js';
|
|
34
|
-
import { ClientUDPSocketSetMulticastTTL, ClientUDPSocketSetMulticastTTLT } from './client-udpsocket-set-multicast-ttl.js';
|
|
35
|
-
import { ClientUDPSocketSetRecvBufferSize, ClientUDPSocketSetRecvBufferSizeT } from './client-udpsocket-set-recv-buffer-size.js';
|
|
36
|
-
import { ClientUDPSocketSetSendBufferSize, ClientUDPSocketSetSendBufferSizeT } from './client-udpsocket-set-send-buffer-size.js';
|
|
37
|
-
import { ClientUDPSocketSetTTL, ClientUDPSocketSetTTLT } from './client-udpsocket-set-ttl.js';
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
export enum ClientPacket {
|
|
41
|
-
NONE = 0,
|
|
42
|
-
ClientTCPSocket = 1,
|
|
43
|
-
ClientTCPServer = 2,
|
|
44
|
-
ClientTCPSocketConnect = 3,
|
|
45
|
-
ClientTCPSocketDestroy = 4,
|
|
46
|
-
ClientTCPSocketDestroySoon = 5,
|
|
47
|
-
ClientTCPSocketEnd = 6,
|
|
48
|
-
ClientTCPSocketPause = 7,
|
|
49
|
-
ClientTCPSocketResume = 8,
|
|
50
|
-
ClientTCPSocketResetAndDestroy = 9,
|
|
51
|
-
ClientTCPSocketSetEncoding = 10,
|
|
52
|
-
ClientTCPSocketSetKeepAlive = 11,
|
|
53
|
-
ClientTCPSocketSetNoDelay = 12,
|
|
54
|
-
ClientTCPSocketSetTimeout = 13,
|
|
55
|
-
ClientTCPSocketWrite = 14,
|
|
56
|
-
ClientTCPServerClose = 15,
|
|
57
|
-
ClientTCPServerGetConnections = 16,
|
|
58
|
-
ClientTCPServerListen = 17,
|
|
59
|
-
ClientUDPSocket = 18,
|
|
60
|
-
ClientUDPSocketAddMembership = 19,
|
|
61
|
-
ClientUDPSocketAddSourceSpecificMembership = 20,
|
|
62
|
-
ClientUDPSocketBind = 21,
|
|
63
|
-
ClientUDPSocketClose = 22,
|
|
64
|
-
ClientUDPSocketDisconnect = 23,
|
|
65
|
-
ClientUDPSocketDropMembership = 24,
|
|
66
|
-
ClientUDPSocketDropSourceSpecificMembership = 25,
|
|
67
|
-
ClientUDPSocketSend = 26,
|
|
68
|
-
ClientUDPSocketSetBroadcast = 27,
|
|
69
|
-
ClientUDPSocketSetMulticastInterface = 28,
|
|
70
|
-
ClientUDPSocketSetMulticastLoopback = 29,
|
|
71
|
-
ClientUDPSocketSetMulticastTTL = 30,
|
|
72
|
-
ClientUDPSocketSetRecvBufferSize = 31,
|
|
73
|
-
ClientUDPSocketSetSendBufferSize = 32,
|
|
74
|
-
ClientUDPSocketSetTTL = 33
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export function unionToClientPacket(
|
|
78
|
-
type: ClientPacket,
|
|
79
|
-
accessor: (obj:ClientTCPServer|ClientTCPServerClose|ClientTCPServerGetConnections|ClientTCPServerListen|ClientTCPSocket|ClientTCPSocketConnect|ClientTCPSocketDestroy|ClientTCPSocketDestroySoon|ClientTCPSocketEnd|ClientTCPSocketPause|ClientTCPSocketResetAndDestroy|ClientTCPSocketResume|ClientTCPSocketSetEncoding|ClientTCPSocketSetKeepAlive|ClientTCPSocketSetNoDelay|ClientTCPSocketSetTimeout|ClientTCPSocketWrite|ClientUDPSocket|ClientUDPSocketAddMembership|ClientUDPSocketAddSourceSpecificMembership|ClientUDPSocketBind|ClientUDPSocketClose|ClientUDPSocketDisconnect|ClientUDPSocketDropMembership|ClientUDPSocketDropSourceSpecificMembership|ClientUDPSocketSend|ClientUDPSocketSetBroadcast|ClientUDPSocketSetMulticastInterface|ClientUDPSocketSetMulticastLoopback|ClientUDPSocketSetMulticastTTL|ClientUDPSocketSetRecvBufferSize|ClientUDPSocketSetSendBufferSize|ClientUDPSocketSetTTL) => ClientTCPServer|ClientTCPServerClose|ClientTCPServerGetConnections|ClientTCPServerListen|ClientTCPSocket|ClientTCPSocketConnect|ClientTCPSocketDestroy|ClientTCPSocketDestroySoon|ClientTCPSocketEnd|ClientTCPSocketPause|ClientTCPSocketResetAndDestroy|ClientTCPSocketResume|ClientTCPSocketSetEncoding|ClientTCPSocketSetKeepAlive|ClientTCPSocketSetNoDelay|ClientTCPSocketSetTimeout|ClientTCPSocketWrite|ClientUDPSocket|ClientUDPSocketAddMembership|ClientUDPSocketAddSourceSpecificMembership|ClientUDPSocketBind|ClientUDPSocketClose|ClientUDPSocketDisconnect|ClientUDPSocketDropMembership|ClientUDPSocketDropSourceSpecificMembership|ClientUDPSocketSend|ClientUDPSocketSetBroadcast|ClientUDPSocketSetMulticastInterface|ClientUDPSocketSetMulticastLoopback|ClientUDPSocketSetMulticastTTL|ClientUDPSocketSetRecvBufferSize|ClientUDPSocketSetSendBufferSize|ClientUDPSocketSetTTL|null
|
|
80
|
-
): ClientTCPServer|ClientTCPServerClose|ClientTCPServerGetConnections|ClientTCPServerListen|ClientTCPSocket|ClientTCPSocketConnect|ClientTCPSocketDestroy|ClientTCPSocketDestroySoon|ClientTCPSocketEnd|ClientTCPSocketPause|ClientTCPSocketResetAndDestroy|ClientTCPSocketResume|ClientTCPSocketSetEncoding|ClientTCPSocketSetKeepAlive|ClientTCPSocketSetNoDelay|ClientTCPSocketSetTimeout|ClientTCPSocketWrite|ClientUDPSocket|ClientUDPSocketAddMembership|ClientUDPSocketAddSourceSpecificMembership|ClientUDPSocketBind|ClientUDPSocketClose|ClientUDPSocketDisconnect|ClientUDPSocketDropMembership|ClientUDPSocketDropSourceSpecificMembership|ClientUDPSocketSend|ClientUDPSocketSetBroadcast|ClientUDPSocketSetMulticastInterface|ClientUDPSocketSetMulticastLoopback|ClientUDPSocketSetMulticastTTL|ClientUDPSocketSetRecvBufferSize|ClientUDPSocketSetSendBufferSize|ClientUDPSocketSetTTL|null {
|
|
81
|
-
switch(ClientPacket[type]) {
|
|
82
|
-
case 'NONE': return null;
|
|
83
|
-
case 'ClientTCPSocket': return accessor(new ClientTCPSocket())! as ClientTCPSocket;
|
|
84
|
-
case 'ClientTCPServer': return accessor(new ClientTCPServer())! as ClientTCPServer;
|
|
85
|
-
case 'ClientTCPSocketConnect': return accessor(new ClientTCPSocketConnect())! as ClientTCPSocketConnect;
|
|
86
|
-
case 'ClientTCPSocketDestroy': return accessor(new ClientTCPSocketDestroy())! as ClientTCPSocketDestroy;
|
|
87
|
-
case 'ClientTCPSocketDestroySoon': return accessor(new ClientTCPSocketDestroySoon())! as ClientTCPSocketDestroySoon;
|
|
88
|
-
case 'ClientTCPSocketEnd': return accessor(new ClientTCPSocketEnd())! as ClientTCPSocketEnd;
|
|
89
|
-
case 'ClientTCPSocketPause': return accessor(new ClientTCPSocketPause())! as ClientTCPSocketPause;
|
|
90
|
-
case 'ClientTCPSocketResume': return accessor(new ClientTCPSocketResume())! as ClientTCPSocketResume;
|
|
91
|
-
case 'ClientTCPSocketResetAndDestroy': return accessor(new ClientTCPSocketResetAndDestroy())! as ClientTCPSocketResetAndDestroy;
|
|
92
|
-
case 'ClientTCPSocketSetEncoding': return accessor(new ClientTCPSocketSetEncoding())! as ClientTCPSocketSetEncoding;
|
|
93
|
-
case 'ClientTCPSocketSetKeepAlive': return accessor(new ClientTCPSocketSetKeepAlive())! as ClientTCPSocketSetKeepAlive;
|
|
94
|
-
case 'ClientTCPSocketSetNoDelay': return accessor(new ClientTCPSocketSetNoDelay())! as ClientTCPSocketSetNoDelay;
|
|
95
|
-
case 'ClientTCPSocketSetTimeout': return accessor(new ClientTCPSocketSetTimeout())! as ClientTCPSocketSetTimeout;
|
|
96
|
-
case 'ClientTCPSocketWrite': return accessor(new ClientTCPSocketWrite())! as ClientTCPSocketWrite;
|
|
97
|
-
case 'ClientTCPServerClose': return accessor(new ClientTCPServerClose())! as ClientTCPServerClose;
|
|
98
|
-
case 'ClientTCPServerGetConnections': return accessor(new ClientTCPServerGetConnections())! as ClientTCPServerGetConnections;
|
|
99
|
-
case 'ClientTCPServerListen': return accessor(new ClientTCPServerListen())! as ClientTCPServerListen;
|
|
100
|
-
case 'ClientUDPSocket': return accessor(new ClientUDPSocket())! as ClientUDPSocket;
|
|
101
|
-
case 'ClientUDPSocketAddMembership': return accessor(new ClientUDPSocketAddMembership())! as ClientUDPSocketAddMembership;
|
|
102
|
-
case 'ClientUDPSocketAddSourceSpecificMembership': return accessor(new ClientUDPSocketAddSourceSpecificMembership())! as ClientUDPSocketAddSourceSpecificMembership;
|
|
103
|
-
case 'ClientUDPSocketBind': return accessor(new ClientUDPSocketBind())! as ClientUDPSocketBind;
|
|
104
|
-
case 'ClientUDPSocketClose': return accessor(new ClientUDPSocketClose())! as ClientUDPSocketClose;
|
|
105
|
-
case 'ClientUDPSocketDisconnect': return accessor(new ClientUDPSocketDisconnect())! as ClientUDPSocketDisconnect;
|
|
106
|
-
case 'ClientUDPSocketDropMembership': return accessor(new ClientUDPSocketDropMembership())! as ClientUDPSocketDropMembership;
|
|
107
|
-
case 'ClientUDPSocketDropSourceSpecificMembership': return accessor(new ClientUDPSocketDropSourceSpecificMembership())! as ClientUDPSocketDropSourceSpecificMembership;
|
|
108
|
-
case 'ClientUDPSocketSend': return accessor(new ClientUDPSocketSend())! as ClientUDPSocketSend;
|
|
109
|
-
case 'ClientUDPSocketSetBroadcast': return accessor(new ClientUDPSocketSetBroadcast())! as ClientUDPSocketSetBroadcast;
|
|
110
|
-
case 'ClientUDPSocketSetMulticastInterface': return accessor(new ClientUDPSocketSetMulticastInterface())! as ClientUDPSocketSetMulticastInterface;
|
|
111
|
-
case 'ClientUDPSocketSetMulticastLoopback': return accessor(new ClientUDPSocketSetMulticastLoopback())! as ClientUDPSocketSetMulticastLoopback;
|
|
112
|
-
case 'ClientUDPSocketSetMulticastTTL': return accessor(new ClientUDPSocketSetMulticastTTL())! as ClientUDPSocketSetMulticastTTL;
|
|
113
|
-
case 'ClientUDPSocketSetRecvBufferSize': return accessor(new ClientUDPSocketSetRecvBufferSize())! as ClientUDPSocketSetRecvBufferSize;
|
|
114
|
-
case 'ClientUDPSocketSetSendBufferSize': return accessor(new ClientUDPSocketSetSendBufferSize())! as ClientUDPSocketSetSendBufferSize;
|
|
115
|
-
case 'ClientUDPSocketSetTTL': return accessor(new ClientUDPSocketSetTTL())! as ClientUDPSocketSetTTL;
|
|
116
|
-
default: return null;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
export function unionListToClientPacket(
|
|
121
|
-
type: ClientPacket,
|
|
122
|
-
accessor: (index: number, obj:ClientTCPServer|ClientTCPServerClose|ClientTCPServerGetConnections|ClientTCPServerListen|ClientTCPSocket|ClientTCPSocketConnect|ClientTCPSocketDestroy|ClientTCPSocketDestroySoon|ClientTCPSocketEnd|ClientTCPSocketPause|ClientTCPSocketResetAndDestroy|ClientTCPSocketResume|ClientTCPSocketSetEncoding|ClientTCPSocketSetKeepAlive|ClientTCPSocketSetNoDelay|ClientTCPSocketSetTimeout|ClientTCPSocketWrite|ClientUDPSocket|ClientUDPSocketAddMembership|ClientUDPSocketAddSourceSpecificMembership|ClientUDPSocketBind|ClientUDPSocketClose|ClientUDPSocketDisconnect|ClientUDPSocketDropMembership|ClientUDPSocketDropSourceSpecificMembership|ClientUDPSocketSend|ClientUDPSocketSetBroadcast|ClientUDPSocketSetMulticastInterface|ClientUDPSocketSetMulticastLoopback|ClientUDPSocketSetMulticastTTL|ClientUDPSocketSetRecvBufferSize|ClientUDPSocketSetSendBufferSize|ClientUDPSocketSetTTL) => ClientTCPServer|ClientTCPServerClose|ClientTCPServerGetConnections|ClientTCPServerListen|ClientTCPSocket|ClientTCPSocketConnect|ClientTCPSocketDestroy|ClientTCPSocketDestroySoon|ClientTCPSocketEnd|ClientTCPSocketPause|ClientTCPSocketResetAndDestroy|ClientTCPSocketResume|ClientTCPSocketSetEncoding|ClientTCPSocketSetKeepAlive|ClientTCPSocketSetNoDelay|ClientTCPSocketSetTimeout|ClientTCPSocketWrite|ClientUDPSocket|ClientUDPSocketAddMembership|ClientUDPSocketAddSourceSpecificMembership|ClientUDPSocketBind|ClientUDPSocketClose|ClientUDPSocketDisconnect|ClientUDPSocketDropMembership|ClientUDPSocketDropSourceSpecificMembership|ClientUDPSocketSend|ClientUDPSocketSetBroadcast|ClientUDPSocketSetMulticastInterface|ClientUDPSocketSetMulticastLoopback|ClientUDPSocketSetMulticastTTL|ClientUDPSocketSetRecvBufferSize|ClientUDPSocketSetSendBufferSize|ClientUDPSocketSetTTL|null,
|
|
123
|
-
index: number
|
|
124
|
-
): ClientTCPServer|ClientTCPServerClose|ClientTCPServerGetConnections|ClientTCPServerListen|ClientTCPSocket|ClientTCPSocketConnect|ClientTCPSocketDestroy|ClientTCPSocketDestroySoon|ClientTCPSocketEnd|ClientTCPSocketPause|ClientTCPSocketResetAndDestroy|ClientTCPSocketResume|ClientTCPSocketSetEncoding|ClientTCPSocketSetKeepAlive|ClientTCPSocketSetNoDelay|ClientTCPSocketSetTimeout|ClientTCPSocketWrite|ClientUDPSocket|ClientUDPSocketAddMembership|ClientUDPSocketAddSourceSpecificMembership|ClientUDPSocketBind|ClientUDPSocketClose|ClientUDPSocketDisconnect|ClientUDPSocketDropMembership|ClientUDPSocketDropSourceSpecificMembership|ClientUDPSocketSend|ClientUDPSocketSetBroadcast|ClientUDPSocketSetMulticastInterface|ClientUDPSocketSetMulticastLoopback|ClientUDPSocketSetMulticastTTL|ClientUDPSocketSetRecvBufferSize|ClientUDPSocketSetSendBufferSize|ClientUDPSocketSetTTL|null {
|
|
125
|
-
switch(ClientPacket[type]) {
|
|
126
|
-
case 'NONE': return null;
|
|
127
|
-
case 'ClientTCPSocket': return accessor(index, new ClientTCPSocket())! as ClientTCPSocket;
|
|
128
|
-
case 'ClientTCPServer': return accessor(index, new ClientTCPServer())! as ClientTCPServer;
|
|
129
|
-
case 'ClientTCPSocketConnect': return accessor(index, new ClientTCPSocketConnect())! as ClientTCPSocketConnect;
|
|
130
|
-
case 'ClientTCPSocketDestroy': return accessor(index, new ClientTCPSocketDestroy())! as ClientTCPSocketDestroy;
|
|
131
|
-
case 'ClientTCPSocketDestroySoon': return accessor(index, new ClientTCPSocketDestroySoon())! as ClientTCPSocketDestroySoon;
|
|
132
|
-
case 'ClientTCPSocketEnd': return accessor(index, new ClientTCPSocketEnd())! as ClientTCPSocketEnd;
|
|
133
|
-
case 'ClientTCPSocketPause': return accessor(index, new ClientTCPSocketPause())! as ClientTCPSocketPause;
|
|
134
|
-
case 'ClientTCPSocketResume': return accessor(index, new ClientTCPSocketResume())! as ClientTCPSocketResume;
|
|
135
|
-
case 'ClientTCPSocketResetAndDestroy': return accessor(index, new ClientTCPSocketResetAndDestroy())! as ClientTCPSocketResetAndDestroy;
|
|
136
|
-
case 'ClientTCPSocketSetEncoding': return accessor(index, new ClientTCPSocketSetEncoding())! as ClientTCPSocketSetEncoding;
|
|
137
|
-
case 'ClientTCPSocketSetKeepAlive': return accessor(index, new ClientTCPSocketSetKeepAlive())! as ClientTCPSocketSetKeepAlive;
|
|
138
|
-
case 'ClientTCPSocketSetNoDelay': return accessor(index, new ClientTCPSocketSetNoDelay())! as ClientTCPSocketSetNoDelay;
|
|
139
|
-
case 'ClientTCPSocketSetTimeout': return accessor(index, new ClientTCPSocketSetTimeout())! as ClientTCPSocketSetTimeout;
|
|
140
|
-
case 'ClientTCPSocketWrite': return accessor(index, new ClientTCPSocketWrite())! as ClientTCPSocketWrite;
|
|
141
|
-
case 'ClientTCPServerClose': return accessor(index, new ClientTCPServerClose())! as ClientTCPServerClose;
|
|
142
|
-
case 'ClientTCPServerGetConnections': return accessor(index, new ClientTCPServerGetConnections())! as ClientTCPServerGetConnections;
|
|
143
|
-
case 'ClientTCPServerListen': return accessor(index, new ClientTCPServerListen())! as ClientTCPServerListen;
|
|
144
|
-
case 'ClientUDPSocket': return accessor(index, new ClientUDPSocket())! as ClientUDPSocket;
|
|
145
|
-
case 'ClientUDPSocketAddMembership': return accessor(index, new ClientUDPSocketAddMembership())! as ClientUDPSocketAddMembership;
|
|
146
|
-
case 'ClientUDPSocketAddSourceSpecificMembership': return accessor(index, new ClientUDPSocketAddSourceSpecificMembership())! as ClientUDPSocketAddSourceSpecificMembership;
|
|
147
|
-
case 'ClientUDPSocketBind': return accessor(index, new ClientUDPSocketBind())! as ClientUDPSocketBind;
|
|
148
|
-
case 'ClientUDPSocketClose': return accessor(index, new ClientUDPSocketClose())! as ClientUDPSocketClose;
|
|
149
|
-
case 'ClientUDPSocketDisconnect': return accessor(index, new ClientUDPSocketDisconnect())! as ClientUDPSocketDisconnect;
|
|
150
|
-
case 'ClientUDPSocketDropMembership': return accessor(index, new ClientUDPSocketDropMembership())! as ClientUDPSocketDropMembership;
|
|
151
|
-
case 'ClientUDPSocketDropSourceSpecificMembership': return accessor(index, new ClientUDPSocketDropSourceSpecificMembership())! as ClientUDPSocketDropSourceSpecificMembership;
|
|
152
|
-
case 'ClientUDPSocketSend': return accessor(index, new ClientUDPSocketSend())! as ClientUDPSocketSend;
|
|
153
|
-
case 'ClientUDPSocketSetBroadcast': return accessor(index, new ClientUDPSocketSetBroadcast())! as ClientUDPSocketSetBroadcast;
|
|
154
|
-
case 'ClientUDPSocketSetMulticastInterface': return accessor(index, new ClientUDPSocketSetMulticastInterface())! as ClientUDPSocketSetMulticastInterface;
|
|
155
|
-
case 'ClientUDPSocketSetMulticastLoopback': return accessor(index, new ClientUDPSocketSetMulticastLoopback())! as ClientUDPSocketSetMulticastLoopback;
|
|
156
|
-
case 'ClientUDPSocketSetMulticastTTL': return accessor(index, new ClientUDPSocketSetMulticastTTL())! as ClientUDPSocketSetMulticastTTL;
|
|
157
|
-
case 'ClientUDPSocketSetRecvBufferSize': return accessor(index, new ClientUDPSocketSetRecvBufferSize())! as ClientUDPSocketSetRecvBufferSize;
|
|
158
|
-
case 'ClientUDPSocketSetSendBufferSize': return accessor(index, new ClientUDPSocketSetSendBufferSize())! as ClientUDPSocketSetSendBufferSize;
|
|
159
|
-
case 'ClientUDPSocketSetTTL': return accessor(index, new ClientUDPSocketSetTTL())! as ClientUDPSocketSetTTL;
|
|
160
|
-
default: return null;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
@@ -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 ClientTCPServerClose implements flatbuffers.IUnpackableObject<ClientTCPServerCloseT> {
|
|
11
|
-
bb: flatbuffers.ByteBuffer|null = null;
|
|
12
|
-
bb_pos = 0;
|
|
13
|
-
__init(i:number, bb:flatbuffers.ByteBuffer):ClientTCPServerClose {
|
|
14
|
-
this.bb_pos = i;
|
|
15
|
-
this.bb = bb;
|
|
16
|
-
return this;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
static getRootAsClientTCPServerClose(bb:flatbuffers.ByteBuffer, obj?:ClientTCPServerClose):ClientTCPServerClose {
|
|
20
|
-
return (obj || new ClientTCPServerClose()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
static getSizePrefixedRootAsClientTCPServerClose(bb:flatbuffers.ByteBuffer, obj?:ClientTCPServerClose):ClientTCPServerClose {
|
|
24
|
-
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
25
|
-
return (obj || new ClientTCPServerClose()).__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
|
-
static startClientTCPServerClose(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 addUuid(builder:flatbuffers.Builder, uuidOffset:flatbuffers.Offset) {
|
|
49
|
-
builder.addFieldOffset(1, uuidOffset, 0);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
static endClientTCPServerClose(builder:flatbuffers.Builder):flatbuffers.Offset {
|
|
53
|
-
const offset = builder.endObject();
|
|
54
|
-
return offset;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
static createClientTCPServerClose(builder:flatbuffers.Builder, type:ClientPacketType, uuidOffset:flatbuffers.Offset):flatbuffers.Offset {
|
|
58
|
-
ClientTCPServerClose.startClientTCPServerClose(builder);
|
|
59
|
-
ClientTCPServerClose.addType(builder, type);
|
|
60
|
-
ClientTCPServerClose.addUuid(builder, uuidOffset);
|
|
61
|
-
return ClientTCPServerClose.endClientTCPServerClose(builder);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
unpack(): ClientTCPServerCloseT {
|
|
65
|
-
return new ClientTCPServerCloseT(
|
|
66
|
-
this.type(),
|
|
67
|
-
this.uuid()
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
unpackTo(_o: ClientTCPServerCloseT): void {
|
|
73
|
-
_o.type = this.type();
|
|
74
|
-
_o.uuid = this.uuid();
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export class ClientTCPServerCloseT implements flatbuffers.IGeneratedObject {
|
|
79
|
-
constructor(
|
|
80
|
-
public type: ClientPacketType = ClientPacketType.TCPSocket,
|
|
81
|
-
public uuid: string|Uint8Array|null = null
|
|
82
|
-
){}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
|
86
|
-
const uuid = (this.uuid !== null ? builder.createString(this.uuid!) : 0);
|
|
87
|
-
|
|
88
|
-
return ClientTCPServerClose.createClientTCPServerClose(builder,
|
|
89
|
-
this.type,
|
|
90
|
-
uuid
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
@@ -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 ClientTCPServerGetConnections implements flatbuffers.IUnpackableObject<ClientTCPServerGetConnectionsT> {
|
|
11
|
-
bb: flatbuffers.ByteBuffer|null = null;
|
|
12
|
-
bb_pos = 0;
|
|
13
|
-
__init(i:number, bb:flatbuffers.ByteBuffer):ClientTCPServerGetConnections {
|
|
14
|
-
this.bb_pos = i;
|
|
15
|
-
this.bb = bb;
|
|
16
|
-
return this;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
static getRootAsClientTCPServerGetConnections(bb:flatbuffers.ByteBuffer, obj?:ClientTCPServerGetConnections):ClientTCPServerGetConnections {
|
|
20
|
-
return (obj || new ClientTCPServerGetConnections()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
static getSizePrefixedRootAsClientTCPServerGetConnections(bb:flatbuffers.ByteBuffer, obj?:ClientTCPServerGetConnections):ClientTCPServerGetConnections {
|
|
24
|
-
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
25
|
-
return (obj || new ClientTCPServerGetConnections()).__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
|
-
static startClientTCPServerGetConnections(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 addUuid(builder:flatbuffers.Builder, uuidOffset:flatbuffers.Offset) {
|
|
49
|
-
builder.addFieldOffset(1, uuidOffset, 0);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
static endClientTCPServerGetConnections(builder:flatbuffers.Builder):flatbuffers.Offset {
|
|
53
|
-
const offset = builder.endObject();
|
|
54
|
-
return offset;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
static createClientTCPServerGetConnections(builder:flatbuffers.Builder, type:ClientPacketType, uuidOffset:flatbuffers.Offset):flatbuffers.Offset {
|
|
58
|
-
ClientTCPServerGetConnections.startClientTCPServerGetConnections(builder);
|
|
59
|
-
ClientTCPServerGetConnections.addType(builder, type);
|
|
60
|
-
ClientTCPServerGetConnections.addUuid(builder, uuidOffset);
|
|
61
|
-
return ClientTCPServerGetConnections.endClientTCPServerGetConnections(builder);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
unpack(): ClientTCPServerGetConnectionsT {
|
|
65
|
-
return new ClientTCPServerGetConnectionsT(
|
|
66
|
-
this.type(),
|
|
67
|
-
this.uuid()
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
unpackTo(_o: ClientTCPServerGetConnectionsT): void {
|
|
73
|
-
_o.type = this.type();
|
|
74
|
-
_o.uuid = this.uuid();
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export class ClientTCPServerGetConnectionsT implements flatbuffers.IGeneratedObject {
|
|
79
|
-
constructor(
|
|
80
|
-
public type: ClientPacketType = ClientPacketType.TCPSocket,
|
|
81
|
-
public uuid: string|Uint8Array|null = null
|
|
82
|
-
){}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
|
86
|
-
const uuid = (this.uuid !== null ? builder.createString(this.uuid!) : 0);
|
|
87
|
-
|
|
88
|
-
return ClientTCPServerGetConnections.createClientTCPServerGetConnections(builder,
|
|
89
|
-
this.type,
|
|
90
|
-
uuid
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
@@ -1,211 +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 ClientTCPServerListen implements flatbuffers.IUnpackableObject<ClientTCPServerListenT> {
|
|
11
|
-
bb: flatbuffers.ByteBuffer|null = null;
|
|
12
|
-
bb_pos = 0;
|
|
13
|
-
__init(i:number, bb:flatbuffers.ByteBuffer):ClientTCPServerListen {
|
|
14
|
-
this.bb_pos = i;
|
|
15
|
-
this.bb = bb;
|
|
16
|
-
return this;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
static getRootAsClientTCPServerListen(bb:flatbuffers.ByteBuffer, obj?:ClientTCPServerListen):ClientTCPServerListen {
|
|
20
|
-
return (obj || new ClientTCPServerListen()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
static getSizePrefixedRootAsClientTCPServerListen(bb:flatbuffers.ByteBuffer, obj?:ClientTCPServerListen):ClientTCPServerListen {
|
|
24
|
-
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
25
|
-
return (obj || new ClientTCPServerListen()).__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
|
-
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
|
-
host():string|null
|
|
46
|
-
host(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
|
47
|
-
host(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
|
-
backlog():number {
|
|
53
|
-
const offset = this.bb!.__offset(this.bb_pos, 12);
|
|
54
|
-
return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
path():string|null
|
|
58
|
-
path(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
|
59
|
-
path(optionalEncoding?:any):string|Uint8Array|null {
|
|
60
|
-
const offset = this.bb!.__offset(this.bb_pos, 14);
|
|
61
|
-
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
exclusive():boolean {
|
|
65
|
-
const offset = this.bb!.__offset(this.bb_pos, 16);
|
|
66
|
-
return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
readableAll():boolean {
|
|
70
|
-
const offset = this.bb!.__offset(this.bb_pos, 18);
|
|
71
|
-
return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
writableAll():boolean {
|
|
75
|
-
const offset = this.bb!.__offset(this.bb_pos, 20);
|
|
76
|
-
return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
ipv6Only():boolean {
|
|
80
|
-
const offset = this.bb!.__offset(this.bb_pos, 22);
|
|
81
|
-
return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
static startClientTCPServerListen(builder:flatbuffers.Builder) {
|
|
85
|
-
builder.startObject(10);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
static addType(builder:flatbuffers.Builder, type:ClientPacketType) {
|
|
89
|
-
builder.addFieldInt8(0, type, ClientPacketType.TCPSocket);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
static addUuid(builder:flatbuffers.Builder, uuidOffset:flatbuffers.Offset) {
|
|
93
|
-
builder.addFieldOffset(1, uuidOffset, 0);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
static addPort(builder:flatbuffers.Builder, port:number) {
|
|
97
|
-
builder.addFieldFloat32(2, port, 0.0);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
static addHost(builder:flatbuffers.Builder, hostOffset:flatbuffers.Offset) {
|
|
101
|
-
builder.addFieldOffset(3, hostOffset, 0);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
static addBacklog(builder:flatbuffers.Builder, backlog:number) {
|
|
105
|
-
builder.addFieldFloat32(4, backlog, 0.0);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
static addPath(builder:flatbuffers.Builder, pathOffset:flatbuffers.Offset) {
|
|
109
|
-
builder.addFieldOffset(5, pathOffset, 0);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
static addExclusive(builder:flatbuffers.Builder, exclusive:boolean) {
|
|
113
|
-
builder.addFieldInt8(6, +exclusive, +false);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
static addReadableAll(builder:flatbuffers.Builder, readableAll:boolean) {
|
|
117
|
-
builder.addFieldInt8(7, +readableAll, +false);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
static addWritableAll(builder:flatbuffers.Builder, writableAll:boolean) {
|
|
121
|
-
builder.addFieldInt8(8, +writableAll, +false);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
static addIpv6Only(builder:flatbuffers.Builder, ipv6Only:boolean) {
|
|
125
|
-
builder.addFieldInt8(9, +ipv6Only, +false);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
static endClientTCPServerListen(builder:flatbuffers.Builder):flatbuffers.Offset {
|
|
129
|
-
const offset = builder.endObject();
|
|
130
|
-
return offset;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
static createClientTCPServerListen(builder:flatbuffers.Builder, type:ClientPacketType, uuidOffset:flatbuffers.Offset, port:number, hostOffset:flatbuffers.Offset, backlog:number, pathOffset:flatbuffers.Offset, exclusive:boolean, readableAll:boolean, writableAll:boolean, ipv6Only:boolean):flatbuffers.Offset {
|
|
134
|
-
ClientTCPServerListen.startClientTCPServerListen(builder);
|
|
135
|
-
ClientTCPServerListen.addType(builder, type);
|
|
136
|
-
ClientTCPServerListen.addUuid(builder, uuidOffset);
|
|
137
|
-
ClientTCPServerListen.addPort(builder, port);
|
|
138
|
-
ClientTCPServerListen.addHost(builder, hostOffset);
|
|
139
|
-
ClientTCPServerListen.addBacklog(builder, backlog);
|
|
140
|
-
ClientTCPServerListen.addPath(builder, pathOffset);
|
|
141
|
-
ClientTCPServerListen.addExclusive(builder, exclusive);
|
|
142
|
-
ClientTCPServerListen.addReadableAll(builder, readableAll);
|
|
143
|
-
ClientTCPServerListen.addWritableAll(builder, writableAll);
|
|
144
|
-
ClientTCPServerListen.addIpv6Only(builder, ipv6Only);
|
|
145
|
-
return ClientTCPServerListen.endClientTCPServerListen(builder);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
unpack(): ClientTCPServerListenT {
|
|
149
|
-
return new ClientTCPServerListenT(
|
|
150
|
-
this.type(),
|
|
151
|
-
this.uuid(),
|
|
152
|
-
this.port(),
|
|
153
|
-
this.host(),
|
|
154
|
-
this.backlog(),
|
|
155
|
-
this.path(),
|
|
156
|
-
this.exclusive(),
|
|
157
|
-
this.readableAll(),
|
|
158
|
-
this.writableAll(),
|
|
159
|
-
this.ipv6Only()
|
|
160
|
-
);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
unpackTo(_o: ClientTCPServerListenT): void {
|
|
165
|
-
_o.type = this.type();
|
|
166
|
-
_o.uuid = this.uuid();
|
|
167
|
-
_o.port = this.port();
|
|
168
|
-
_o.host = this.host();
|
|
169
|
-
_o.backlog = this.backlog();
|
|
170
|
-
_o.path = this.path();
|
|
171
|
-
_o.exclusive = this.exclusive();
|
|
172
|
-
_o.readableAll = this.readableAll();
|
|
173
|
-
_o.writableAll = this.writableAll();
|
|
174
|
-
_o.ipv6Only = this.ipv6Only();
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
export class ClientTCPServerListenT implements flatbuffers.IGeneratedObject {
|
|
179
|
-
constructor(
|
|
180
|
-
public type: ClientPacketType = ClientPacketType.TCPSocket,
|
|
181
|
-
public uuid: string|Uint8Array|null = null,
|
|
182
|
-
public port: number = 0.0,
|
|
183
|
-
public host: string|Uint8Array|null = null,
|
|
184
|
-
public backlog: number = 0.0,
|
|
185
|
-
public path: string|Uint8Array|null = null,
|
|
186
|
-
public exclusive: boolean = false,
|
|
187
|
-
public readableAll: boolean = false,
|
|
188
|
-
public writableAll: boolean = false,
|
|
189
|
-
public ipv6Only: boolean = false
|
|
190
|
-
){}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
|
194
|
-
const uuid = (this.uuid !== null ? builder.createString(this.uuid!) : 0);
|
|
195
|
-
const host = (this.host !== null ? builder.createString(this.host!) : 0);
|
|
196
|
-
const path = (this.path !== null ? builder.createString(this.path!) : 0);
|
|
197
|
-
|
|
198
|
-
return ClientTCPServerListen.createClientTCPServerListen(builder,
|
|
199
|
-
this.type,
|
|
200
|
-
uuid,
|
|
201
|
-
this.port,
|
|
202
|
-
host,
|
|
203
|
-
this.backlog,
|
|
204
|
-
path,
|
|
205
|
-
this.exclusive,
|
|
206
|
-
this.readableAll,
|
|
207
|
-
this.writableAll,
|
|
208
|
-
this.ipv6Only
|
|
209
|
-
);
|
|
210
|
-
}
|
|
211
|
-
}
|