@litert/televoke 1.0.1 → 1.0.2
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/CHANGES.md +4 -0
- package/lib/client/Client.decl.d.ts +14 -14
- package/lib/client/Client.decl.d.ts.map +1 -1
- package/lib/client/Client.decl.js +14 -14
- package/lib/client/Client.decl.js.map +1 -1
- package/lib/client/JsonApiClient.impl.d.ts +14 -14
- package/lib/client/JsonApiClient.impl.d.ts.map +1 -1
- package/lib/client/JsonApiClient.impl.js +14 -14
- package/lib/client/JsonApiClient.impl.js.map +1 -1
- package/lib/client/LegacyHttpClient.impl.d.ts +14 -14
- package/lib/client/LegacyHttpClient.impl.d.ts.map +1 -1
- package/lib/client/LegacyHttpClient.impl.js +14 -14
- package/lib/client/LegacyHttpClient.impl.js.map +1 -1
- package/lib/client/index.d.ts +14 -14
- package/lib/client/index.d.ts.map +1 -1
- package/lib/client/index.js +14 -14
- package/lib/client/index.js.map +1 -1
- package/lib/index.d.ts +14 -14
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +14 -14
- package/lib/index.js.map +1 -1
- package/lib/server/LegacyServerChannel.impl.d.ts +14 -14
- package/lib/server/LegacyServerChannel.impl.d.ts.map +1 -1
- package/lib/server/LegacyServerChannel.impl.js +14 -14
- package/lib/server/LegacyServerChannel.impl.js.map +1 -1
- package/lib/server/Server.decl.d.ts +14 -14
- package/lib/server/Server.decl.d.ts.map +1 -1
- package/lib/server/Server.decl.js +14 -14
- package/lib/server/Server.decl.js.map +1 -1
- package/lib/server/Server.impl.d.ts +14 -14
- package/lib/server/Server.impl.d.ts.map +1 -1
- package/lib/server/Server.impl.js +14 -14
- package/lib/server/Server.impl.js.map +1 -1
- package/lib/server/ServerChannel.d.ts +14 -14
- package/lib/server/ServerChannel.d.ts.map +1 -1
- package/lib/server/ServerChannel.js +14 -14
- package/lib/server/ServerChannel.js.map +1 -1
- package/lib/server/SimpleJsonApiRouter.d.ts +14 -14
- package/lib/server/SimpleJsonApiRouter.d.ts.map +1 -1
- package/lib/server/SimpleJsonApiRouter.js +14 -14
- package/lib/server/SimpleJsonApiRouter.js.map +1 -1
- package/lib/server/index.d.ts +14 -14
- package/lib/server/index.d.ts.map +1 -1
- package/lib/server/index.js +14 -14
- package/lib/server/index.js.map +1 -1
- package/lib/shared/BinaryStream.d.ts +14 -14
- package/lib/shared/BinaryStream.d.ts.map +1 -1
- package/lib/shared/BinaryStream.js +14 -14
- package/lib/shared/BinaryStream.js.map +1 -1
- package/lib/shared/BinaryStreamManager.d.ts +14 -14
- package/lib/shared/BinaryStreamManager.d.ts.map +1 -1
- package/lib/shared/BinaryStreamManager.js +14 -14
- package/lib/shared/BinaryStreamManager.js.map +1 -1
- package/lib/shared/Channel.impl.d.ts +14 -14
- package/lib/shared/Channel.impl.d.ts.map +1 -1
- package/lib/shared/Channel.impl.js +14 -14
- package/lib/shared/Channel.impl.js.map +1 -1
- package/lib/shared/Constants.d.ts +14 -14
- package/lib/shared/Constants.d.ts.map +1 -1
- package/lib/shared/Constants.js +14 -14
- package/lib/shared/Constants.js.map +1 -1
- package/lib/shared/Encodings/index.d.ts +14 -14
- package/lib/shared/Encodings/index.d.ts.map +1 -1
- package/lib/shared/Encodings/index.js +14 -14
- package/lib/shared/Encodings/index.js.map +1 -1
- package/lib/shared/Encodings/v1/EncoderV1.d.ts +14 -14
- package/lib/shared/Encodings/v1/EncoderV1.d.ts.map +1 -1
- package/lib/shared/Encodings/v1/EncoderV1.js +14 -14
- package/lib/shared/Encodings/v1/EncoderV1.js.map +1 -1
- package/lib/shared/Encodings/v1/Protocol.v1.decls.d.ts +14 -14
- package/lib/shared/Encodings/v1/Protocol.v1.decls.d.ts.map +1 -1
- package/lib/shared/Encodings/v1/Protocol.v1.decls.js +14 -14
- package/lib/shared/Encodings/v1/Protocol.v1.decls.js.map +1 -1
- package/lib/shared/Encodings/v1/index.d.ts +14 -14
- package/lib/shared/Encodings/v1/index.d.ts.map +1 -1
- package/lib/shared/Encodings/v1/index.js +14 -14
- package/lib/shared/Encodings/v1/index.js.map +1 -1
- package/lib/shared/Encodings/v2/Constants.v2.d.ts +14 -14
- package/lib/shared/Encodings/v2/Constants.v2.d.ts.map +1 -1
- package/lib/shared/Encodings/v2/Constants.v2.js +14 -14
- package/lib/shared/Encodings/v2/Constants.v2.js.map +1 -1
- package/lib/shared/Encodings/v2/DecoderV2.d.ts +14 -14
- package/lib/shared/Encodings/v2/DecoderV2.d.ts.map +1 -1
- package/lib/shared/Encodings/v2/DecoderV2.js +14 -14
- package/lib/shared/Encodings/v2/DecoderV2.js.map +1 -1
- package/lib/shared/Encodings/v2/EncoderV2.d.ts +14 -14
- package/lib/shared/Encodings/v2/EncoderV2.d.ts.map +1 -1
- package/lib/shared/Encodings/v2/EncoderV2.js +14 -14
- package/lib/shared/Encodings/v2/EncoderV2.js.map +1 -1
- package/lib/shared/Encodings/v2/Encoding.v2.decl.d.ts +14 -14
- package/lib/shared/Encodings/v2/Encoding.v2.decl.d.ts.map +1 -1
- package/lib/shared/Encodings/v2/Encoding.v2.decl.js +14 -14
- package/lib/shared/Encodings/v2/Encoding.v2.decl.js.map +1 -1
- package/lib/shared/Encodings/v2/index.d.ts +14 -14
- package/lib/shared/Encodings/v2/index.d.ts.map +1 -1
- package/lib/shared/Encodings/v2/index.js +14 -14
- package/lib/shared/Encodings/v2/index.js.map +1 -1
- package/lib/shared/Errors.d.ts +14 -14
- package/lib/shared/Errors.d.ts.map +1 -1
- package/lib/shared/Errors.js +14 -14
- package/lib/shared/Errors.js.map +1 -1
- package/lib/shared/Shared.decl.d.ts +14 -14
- package/lib/shared/Shared.decl.d.ts.map +1 -1
- package/lib/shared/Shared.decl.js +14 -14
- package/lib/shared/Shared.decl.js.map +1 -1
- package/lib/shared/Utils.d.ts +14 -14
- package/lib/shared/Utils.d.ts.map +1 -1
- package/lib/shared/Utils.js +14 -14
- package/lib/shared/Utils.js.map +1 -1
- package/lib/shared/index.d.ts +14 -14
- package/lib/shared/index.d.ts.map +1 -1
- package/lib/shared/index.js +14 -14
- package/lib/shared/index.js.map +1 -1
- package/lib/transporters/Transporter.decl.d.ts +14 -14
- package/lib/transporters/Transporter.decl.d.ts.map +1 -1
- package/lib/transporters/Transporter.decl.js +14 -14
- package/lib/transporters/Transporter.decl.js.map +1 -1
- package/lib/transporters/http-listener/AbstractHttpListener.d.ts +14 -14
- package/lib/transporters/http-listener/AbstractHttpListener.d.ts.map +1 -1
- package/lib/transporters/http-listener/AbstractHttpListener.js +14 -14
- package/lib/transporters/http-listener/AbstractHttpListener.js.map +1 -1
- package/lib/transporters/http-listener/Http.Decl.d.ts +14 -14
- package/lib/transporters/http-listener/Http.Decl.d.ts.map +1 -1
- package/lib/transporters/http-listener/Http.Decl.js +14 -14
- package/lib/transporters/http-listener/Http.Decl.js.map +1 -1
- package/lib/transporters/http-listener/HttpListener.d.ts +14 -14
- package/lib/transporters/http-listener/HttpListener.d.ts.map +1 -1
- package/lib/transporters/http-listener/HttpListener.js +14 -14
- package/lib/transporters/http-listener/HttpListener.js.map +1 -1
- package/lib/transporters/http-listener/HttpUnixSocketListener.d.ts +14 -14
- package/lib/transporters/http-listener/HttpUnixSocketListener.d.ts.map +1 -1
- package/lib/transporters/http-listener/HttpUnixSocketListener.js +14 -14
- package/lib/transporters/http-listener/HttpUnixSocketListener.js.map +1 -1
- package/lib/transporters/http-listener/HttpsListener.d.ts +14 -14
- package/lib/transporters/http-listener/HttpsListener.d.ts.map +1 -1
- package/lib/transporters/http-listener/HttpsListener.js +14 -14
- package/lib/transporters/http-listener/HttpsListener.js.map +1 -1
- package/lib/transporters/http-listener/index.d.ts +14 -14
- package/lib/transporters/http-listener/index.d.ts.map +1 -1
- package/lib/transporters/http-listener/index.js +14 -14
- package/lib/transporters/http-listener/index.js.map +1 -1
- package/lib/transporters/index.d.ts +14 -14
- package/lib/transporters/index.d.ts.map +1 -1
- package/lib/transporters/index.js +14 -14
- package/lib/transporters/index.js.map +1 -1
- package/lib/transporters/legacy-http/LegacyHttp.Server.d.ts +14 -14
- package/lib/transporters/legacy-http/LegacyHttp.Server.d.ts.map +1 -1
- package/lib/transporters/legacy-http/LegacyHttp.Server.js +14 -14
- package/lib/transporters/legacy-http/LegacyHttp.Server.js.map +1 -1
- package/lib/transporters/legacy-http/LegacyHttp.Transporter.d.ts +14 -14
- package/lib/transporters/legacy-http/LegacyHttp.Transporter.d.ts.map +1 -1
- package/lib/transporters/legacy-http/LegacyHttp.Transporter.js +14 -14
- package/lib/transporters/legacy-http/LegacyHttp.Transporter.js.map +1 -1
- package/lib/transporters/legacy-http/index.d.ts +14 -14
- package/lib/transporters/legacy-http/index.d.ts.map +1 -1
- package/lib/transporters/legacy-http/index.js +14 -14
- package/lib/transporters/legacy-http/index.js.map +1 -1
- package/lib/transporters/lwdfx/LwDFX.Tcp.Client.d.ts +14 -14
- package/lib/transporters/lwdfx/LwDFX.Tcp.Client.d.ts.map +1 -1
- package/lib/transporters/lwdfx/LwDFX.Tcp.Client.js +14 -14
- package/lib/transporters/lwdfx/LwDFX.Tcp.Client.js.map +1 -1
- package/lib/transporters/lwdfx/LwDFX.Tcp.Server.d.ts +14 -14
- package/lib/transporters/lwdfx/LwDFX.Tcp.Server.d.ts.map +1 -1
- package/lib/transporters/lwdfx/LwDFX.Tcp.Server.js +14 -14
- package/lib/transporters/lwdfx/LwDFX.Tcp.Server.js.map +1 -1
- package/lib/transporters/lwdfx/LwDFX.Tls.Client.d.ts +14 -14
- package/lib/transporters/lwdfx/LwDFX.Tls.Client.d.ts.map +1 -1
- package/lib/transporters/lwdfx/LwDFX.Tls.Client.js +14 -14
- package/lib/transporters/lwdfx/LwDFX.Tls.Client.js.map +1 -1
- package/lib/transporters/lwdfx/LwDFX.Tls.Server.d.ts +14 -14
- package/lib/transporters/lwdfx/LwDFX.Tls.Server.d.ts.map +1 -1
- package/lib/transporters/lwdfx/LwDFX.Tls.Server.js +14 -14
- package/lib/transporters/lwdfx/LwDFX.Tls.Server.js.map +1 -1
- package/lib/transporters/lwdfx/LwDFX.Transporter.d.ts +14 -14
- package/lib/transporters/lwdfx/LwDFX.Transporter.d.ts.map +1 -1
- package/lib/transporters/lwdfx/LwDFX.Transporter.js +14 -14
- package/lib/transporters/lwdfx/LwDFX.Transporter.js.map +1 -1
- package/lib/transporters/lwdfx/LwDFX.UnixSocket.Client.d.ts +14 -14
- package/lib/transporters/lwdfx/LwDFX.UnixSocket.Client.d.ts.map +1 -1
- package/lib/transporters/lwdfx/LwDFX.UnixSocket.Client.js +14 -14
- package/lib/transporters/lwdfx/LwDFX.UnixSocket.Client.js.map +1 -1
- package/lib/transporters/lwdfx/LwDFX.UnixSocket.Server.d.ts +14 -14
- package/lib/transporters/lwdfx/LwDFX.UnixSocket.Server.d.ts.map +1 -1
- package/lib/transporters/lwdfx/LwDFX.UnixSocket.Server.js +14 -14
- package/lib/transporters/lwdfx/LwDFX.UnixSocket.Server.js.map +1 -1
- package/lib/transporters/lwdfx/LwDFX.decl.d.ts +14 -14
- package/lib/transporters/lwdfx/LwDFX.decl.d.ts.map +1 -1
- package/lib/transporters/lwdfx/LwDFX.decl.js +14 -14
- package/lib/transporters/lwdfx/LwDFX.decl.js.map +1 -1
- package/lib/transporters/lwdfx/index.d.ts +14 -14
- package/lib/transporters/lwdfx/index.d.ts.map +1 -1
- package/lib/transporters/lwdfx/index.js +14 -14
- package/lib/transporters/lwdfx/index.js.map +1 -1
- package/lib/transporters/memory/Memory.Impl.d.ts +14 -14
- package/lib/transporters/memory/Memory.Impl.d.ts.map +1 -1
- package/lib/transporters/memory/Memory.Impl.js +14 -14
- package/lib/transporters/memory/Memory.Impl.js.map +1 -1
- package/lib/transporters/memory/index.d.ts +14 -14
- package/lib/transporters/memory/index.d.ts.map +1 -1
- package/lib/transporters/memory/index.js +14 -14
- package/lib/transporters/memory/index.js.map +1 -1
- package/lib/transporters/websocket/WebSocket.Client.d.ts +14 -14
- package/lib/transporters/websocket/WebSocket.Client.d.ts.map +1 -1
- package/lib/transporters/websocket/WebSocket.Client.js +16 -16
- package/lib/transporters/websocket/WebSocket.Client.js.map +1 -1
- package/lib/transporters/websocket/WebSocket.Server.d.ts +14 -14
- package/lib/transporters/websocket/WebSocket.Server.d.ts.map +1 -1
- package/lib/transporters/websocket/WebSocket.Server.js +15 -15
- package/lib/transporters/websocket/WebSocket.Server.js.map +1 -1
- package/lib/transporters/websocket/WebSocket.Transporter.d.ts +14 -14
- package/lib/transporters/websocket/WebSocket.Transporter.d.ts.map +1 -1
- package/lib/transporters/websocket/WebSocket.Transporter.js +15 -15
- package/lib/transporters/websocket/WebSocket.Transporter.js.map +1 -1
- package/lib/transporters/websocket/WebSocket.decl.d.ts +14 -14
- package/lib/transporters/websocket/WebSocket.decl.d.ts.map +1 -1
- package/lib/transporters/websocket/WebSocket.decl.js +14 -14
- package/lib/transporters/websocket/WebSocket.decl.js.map +1 -1
- package/lib/transporters/websocket/index.d.ts +14 -14
- package/lib/transporters/websocket/index.d.ts.map +1 -1
- package/lib/transporters/websocket/index.js +14 -14
- package/lib/transporters/websocket/index.js.map +1 -1
- package/package.json +8 -8
- package/src/lib/client/Client.decl.ts +14 -14
- package/src/lib/client/JsonApiClient.impl.ts +14 -14
- package/src/lib/client/LegacyHttpClient.impl.ts +14 -14
- package/src/lib/client/index.ts +14 -14
- package/src/lib/index.ts +14 -14
- package/src/lib/server/LegacyServerChannel.impl.ts +14 -14
- package/src/lib/server/Server.decl.ts +14 -14
- package/src/lib/server/Server.impl.ts +14 -14
- package/src/lib/server/ServerChannel.ts +14 -14
- package/src/lib/server/SimpleJsonApiRouter.ts +14 -14
- package/src/lib/server/index.ts +14 -14
- package/src/lib/shared/BinaryStream.ts +14 -14
- package/src/lib/shared/BinaryStreamManager.ts +14 -14
- package/src/lib/shared/Channel.impl.ts +14 -14
- package/src/lib/shared/Constants.ts +14 -14
- package/src/lib/shared/Encodings/index.ts +14 -14
- package/src/lib/shared/Encodings/v1/EncoderV1.ts +14 -14
- package/src/lib/shared/Encodings/v1/Protocol.v1.decls.ts +14 -14
- package/src/lib/shared/Encodings/v1/index.ts +14 -14
- package/src/lib/shared/Encodings/v2/Constants.v2.ts +14 -14
- package/src/lib/shared/Encodings/v2/DecoderV2.ts +14 -14
- package/src/lib/shared/Encodings/v2/EncoderV2.ts +14 -14
- package/src/lib/shared/Encodings/v2/Encoding.v2.decl.ts +14 -14
- package/src/lib/shared/Encodings/v2/index.ts +14 -14
- package/src/lib/shared/Errors.ts +14 -14
- package/src/lib/shared/Shared.decl.ts +14 -14
- package/src/lib/shared/Utils.ts +14 -14
- package/src/lib/shared/index.ts +14 -14
- package/src/lib/transporters/Transporter.decl.ts +14 -14
- package/src/lib/transporters/http-listener/AbstractHttpListener.ts +14 -14
- package/src/lib/transporters/http-listener/Http.Decl.ts +14 -14
- package/src/lib/transporters/http-listener/HttpListener.ts +14 -14
- package/src/lib/transporters/http-listener/HttpUnixSocketListener.ts +14 -14
- package/src/lib/transporters/http-listener/HttpsListener.ts +14 -14
- package/src/lib/transporters/http-listener/index.ts +14 -14
- package/src/lib/transporters/index.ts +14 -14
- package/src/lib/transporters/legacy-http/LegacyHttp.Server.ts +14 -14
- package/src/lib/transporters/legacy-http/LegacyHttp.Transporter.ts +14 -14
- package/src/lib/transporters/legacy-http/index.ts +14 -14
- package/src/lib/transporters/lwdfx/LwDFX.Tcp.Client.ts +14 -14
- package/src/lib/transporters/lwdfx/LwDFX.Tcp.Server.ts +14 -14
- package/src/lib/transporters/lwdfx/LwDFX.Tls.Client.ts +14 -14
- package/src/lib/transporters/lwdfx/LwDFX.Tls.Server.ts +14 -14
- package/src/lib/transporters/lwdfx/LwDFX.Transporter.ts +14 -14
- package/src/lib/transporters/lwdfx/LwDFX.UnixSocket.Client.ts +14 -14
- package/src/lib/transporters/lwdfx/LwDFX.UnixSocket.Server.ts +14 -14
- package/src/lib/transporters/lwdfx/LwDFX.decl.ts +14 -14
- package/src/lib/transporters/lwdfx/index.ts +14 -14
- package/src/lib/transporters/memory/Memory.Impl.ts +14 -14
- package/src/lib/transporters/memory/index.ts +14 -14
- package/src/lib/transporters/websocket/WebSocket.Client.ts +16 -16
- package/src/lib/transporters/websocket/WebSocket.Server.ts +15 -15
- package/src/lib/transporters/websocket/WebSocket.Transporter.ts +17 -17
- package/src/lib/transporters/websocket/WebSocket.decl.ts +14 -14
- package/src/lib/transporters/websocket/index.ts +14 -14
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
2
|
+
* Copyright 2024 Angus.Fenying <fenying@litert.org>
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
16
|
|
|
17
17
|
import * as LibWS from '@litert/websocket';
|
|
18
18
|
import * as dWS from './WebSocket.decl';
|
|
@@ -65,12 +65,12 @@ class WssConnector implements dT.IConnector {
|
|
|
65
65
|
|
|
66
66
|
export function createWsConnector(opts: LibWS.IWsConnectOptions): dT.IConnector {
|
|
67
67
|
|
|
68
|
-
opts.
|
|
68
|
+
opts.frameReceiveMode = LibWS.EFrameReceiveMode.LITE;
|
|
69
69
|
return new WsConnector(opts);
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
export function createWssConnector(opts: LibWS.IWssConnectOptions): dT.IConnector {
|
|
73
73
|
|
|
74
|
-
opts.
|
|
74
|
+
opts.frameReceiveMode = LibWS.EFrameReceiveMode.LITE;
|
|
75
75
|
return new WssConnector(opts);
|
|
76
76
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
2
|
+
* Copyright 2024 Angus.Fenying <fenying@litert.org>
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
16
|
|
|
17
17
|
import * as LibWS from '@litert/websocket';
|
|
18
18
|
import * as dWS from './WebSocket.decl';
|
|
@@ -38,7 +38,7 @@ class WebSocketGateway extends EventEmitter implements dT.IGateway {
|
|
|
38
38
|
.setUpgradeProcessor(this._onUpgrade);
|
|
39
39
|
|
|
40
40
|
this._wsServer = LibWS.createServer({
|
|
41
|
-
|
|
41
|
+
frameReceiveMode: LibWS.EFrameReceiveMode.LITE,
|
|
42
42
|
timeout,
|
|
43
43
|
});
|
|
44
44
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
2
|
+
* Copyright 2024 Angus.Fenying <fenying@litert.org>
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
16
|
|
|
17
17
|
import * as LibWS from '@litert/websocket';
|
|
18
18
|
import * as Shared from '../../shared';
|
|
@@ -32,17 +32,17 @@ export class WebSocketTransporter extends EventEmitter implements dT.ITransporte
|
|
|
32
32
|
this._conn
|
|
33
33
|
.on('end', () => this.emit('end'))
|
|
34
34
|
.on('finish', () => this.emit('finish'))
|
|
35
|
-
.on('
|
|
35
|
+
.on('message', (frame) => {
|
|
36
36
|
|
|
37
37
|
switch (frame.opcode) {
|
|
38
38
|
case LibWS.EOpcode.BINARY:
|
|
39
|
-
this.emit('frame', (frame as LibWS.
|
|
39
|
+
this.emit('frame', (frame as LibWS.ISimpleMessage).data);
|
|
40
40
|
break;
|
|
41
41
|
case LibWS.EOpcode.CLOSE:
|
|
42
42
|
this.end();
|
|
43
43
|
break;
|
|
44
44
|
case LibWS.EOpcode.PING:
|
|
45
|
-
this._conn.pong(Buffer.concat((frame as LibWS.
|
|
45
|
+
this._conn.pong(Buffer.concat((frame as LibWS.ISimpleMessage).data));
|
|
46
46
|
break;
|
|
47
47
|
default:
|
|
48
48
|
this.emit('error', new Shared.errors.network_error({ reason: 'invalid_frame' }));
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
2
|
+
* Copyright 2024 Angus.Fenying <fenying@litert.org>
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
16
|
|
|
17
17
|
export const WEBSOCKET_SUB_PROTOCOL = 'televoke2';
|
|
18
18
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
2
|
+
* Copyright 2024 Angus.Fenying <fenying@litert.org>
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
16
|
|
|
17
17
|
export * from './WebSocket.Client';
|
|
18
18
|
export * from './WebSocket.Server';
|