@react-native-ohos/react-native-tcp-socket 6.3.1-rc.1 → 6.3.1-rc.3

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.
Files changed (22) hide show
  1. package/README.md +1 -1
  2. package/harmony/tcp_socket/oh-package.json5 +1 -1
  3. package/harmony/tcp_socket/src/main/cpp/generated/RNOH/generated/BaseReactNativeTcpSocketPackage.h +72 -72
  4. package/harmony/tcp_socket/src/main/cpp/generated/RNOH/generated/turbo_modules/TcpSocketModule.cpp +28 -28
  5. package/harmony/tcp_socket/src/main/cpp/generated/RNOH/generated/turbo_modules/TcpSocketModule.h +16 -16
  6. package/harmony/tcp_socket/src/main/cpp/generated/react/renderer/components/react_native_tcp_socket/ComponentDescriptors.h +24 -24
  7. package/harmony/tcp_socket/src/main/cpp/generated/react/renderer/components/react_native_tcp_socket/EventEmitters.cpp +16 -16
  8. package/harmony/tcp_socket/src/main/cpp/generated/react/renderer/components/react_native_tcp_socket/EventEmitters.h +17 -17
  9. package/harmony/tcp_socket/src/main/cpp/generated/react/renderer/components/react_native_tcp_socket/Props.cpp +19 -19
  10. package/harmony/tcp_socket/src/main/cpp/generated/react/renderer/components/react_native_tcp_socket/Props.h +18 -18
  11. package/harmony/tcp_socket/src/main/cpp/generated/react/renderer/components/react_native_tcp_socket/ShadowNodes.cpp +17 -17
  12. package/harmony/tcp_socket/src/main/cpp/generated/react/renderer/components/react_native_tcp_socket/ShadowNodes.h +23 -23
  13. package/harmony/tcp_socket/src/main/cpp/generated/react/renderer/components/react_native_tcp_socket/States.cpp +16 -16
  14. package/harmony/tcp_socket/src/main/cpp/generated/react/renderer/components/react_native_tcp_socket/States.h +18 -18
  15. package/harmony/tcp_socket/src/main/ets/generated/components/ts.ts +5 -5
  16. package/harmony/tcp_socket/src/main/ets/generated/index.ets +5 -5
  17. package/harmony/tcp_socket/src/main/ets/generated/ts.ts +6 -6
  18. package/harmony/tcp_socket/src/main/ets/generated/turboModules/TcpSocketModule.ts +38 -38
  19. package/harmony/tcp_socket/src/main/ets/generated/turboModules/ts.ts +5 -5
  20. package/harmony/tcp_socket.har +0 -0
  21. package/package.json +1 -1
  22. package/src/Server.js +1 -0
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @react-native-ohos/react-native-tcp-socket
2
2
 
3
- This project is based on [react-native-tcp-socket](https://github.com/Rapsssito/react-native-tcp-socket)
3
+ This project is based on [react-native-tcp-socket@6.3.0](https://github.com/Rapsssito/react-native-tcp-socket/tree/v6.3.0)
4
4
 
5
5
  ## Documentation
6
6
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-ohos/react-native-tcp-socket",
3
- "version": "6.3.1-rc.1",
3
+ "version": "6.3.1-rc.3",
4
4
  "description": "Please describe the basic information.",
5
5
  "main": "Index.ets",
6
6
  "author": "",
@@ -1,72 +1,72 @@
1
- /**
2
- * This code was generated by "react-native codegen-lib-harmony"
3
- */
4
-
5
- #pragma once
6
-
7
- #include "RNOH/Package.h"
8
- #include "RNOH/ArkTSTurboModule.h"
9
- #include "RNOH/generated/turbo_modules/TcpSocketModule.h"
10
-
11
- namespace rnoh {
12
-
13
- class BaseReactNativeTcpSocketPackageTurboModuleFactoryDelegate : public TurboModuleFactoryDelegate {
14
- public:
15
- SharedTurboModule createTurboModule(Context ctx, const std::string &name) const override {
16
- if (name == "TcpSocketModule") {
17
- return std::make_shared<TcpSocketModule>(ctx, name);
18
- }
19
- return nullptr;
20
- };
21
- };
22
-
23
- class BaseReactNativeTcpSocketPackageEventEmitRequestHandler : public EventEmitRequestHandler {
24
- public:
25
- void handleEvent(Context const &ctx) override {
26
- auto eventEmitter = ctx.shadowViewRegistry->getEventEmitter<facebook::react::EventEmitter>(ctx.tag);
27
- auto componentName = ctx.shadowViewRegistry->getComponentName(ctx.tag);
28
-
29
- if (eventEmitter == nullptr) {
30
- return;
31
- }
32
-
33
- std::vector<std::string> supportedComponentNames = {
34
- };
35
-
36
- std::vector<std::string> supportedEventNames = {
37
- };
38
-
39
- if (std::find(supportedComponentNames.begin(), supportedComponentNames.end(), componentName) != supportedComponentNames.end() &&
40
- std::find(supportedEventNames.begin(), supportedEventNames.end(), ctx.eventName) != supportedEventNames.end()) {
41
- eventEmitter->dispatchEvent(ctx.eventName, ArkJS(ctx.env).getDynamic(ctx.payload));
42
- }
43
- }
44
- };
45
-
46
-
47
- class BaseReactNativeTcpSocketPackage : public Package {
48
- public:
49
- BaseReactNativeTcpSocketPackage(Package::Context ctx) : Package(ctx){};
50
-
51
- std::unique_ptr<TurboModuleFactoryDelegate> createTurboModuleFactoryDelegate() override {
52
- return std::make_unique<BaseReactNativeTcpSocketPackageTurboModuleFactoryDelegate>();
53
- }
54
-
55
- std::vector<facebook::react::ComponentDescriptorProvider> createComponentDescriptorProviders() override {
56
- return {
57
- };
58
- }
59
-
60
- ComponentJSIBinderByString createComponentJSIBinderByName() override {
61
- return {
62
- };
63
- };
64
-
65
- EventEmitRequestHandlers createEventEmitRequestHandlers() override {
66
- return {
67
- std::make_shared<BaseReactNativeTcpSocketPackageEventEmitRequestHandler>(),
68
- };
69
- }
70
- };
71
-
72
- } // namespace rnoh
1
+ /**
2
+ * This code was generated by "react-native codegen-lib-harmony"
3
+ */
4
+
5
+ #pragma once
6
+
7
+ #include "RNOH/Package.h"
8
+ #include "RNOH/ArkTSTurboModule.h"
9
+ #include "RNOH/generated/turbo_modules/TcpSocketModule.h"
10
+
11
+ namespace rnoh {
12
+
13
+ class BaseReactNativeTcpSocketPackageTurboModuleFactoryDelegate : public TurboModuleFactoryDelegate {
14
+ public:
15
+ SharedTurboModule createTurboModule(Context ctx, const std::string &name) const override {
16
+ if (name == "TcpSocketModule") {
17
+ return std::make_shared<TcpSocketModule>(ctx, name);
18
+ }
19
+ return nullptr;
20
+ };
21
+ };
22
+
23
+ class BaseReactNativeTcpSocketPackageEventEmitRequestHandler : public EventEmitRequestHandler {
24
+ public:
25
+ void handleEvent(Context const &ctx) override {
26
+ auto eventEmitter = ctx.shadowViewRegistry->getEventEmitter<facebook::react::EventEmitter>(ctx.tag);
27
+ auto componentName = ctx.shadowViewRegistry->getComponentName(ctx.tag);
28
+
29
+ if (eventEmitter == nullptr) {
30
+ return;
31
+ }
32
+
33
+ std::vector<std::string> supportedComponentNames = {
34
+ };
35
+
36
+ std::vector<std::string> supportedEventNames = {
37
+ };
38
+
39
+ if (std::find(supportedComponentNames.begin(), supportedComponentNames.end(), componentName) != supportedComponentNames.end() &&
40
+ std::find(supportedEventNames.begin(), supportedEventNames.end(), ctx.eventName) != supportedEventNames.end()) {
41
+ eventEmitter->dispatchEvent(ctx.eventName, ArkJS(ctx.env).getDynamic(ctx.payload));
42
+ }
43
+ }
44
+ };
45
+
46
+
47
+ class BaseReactNativeTcpSocketPackage : public Package {
48
+ public:
49
+ BaseReactNativeTcpSocketPackage(Package::Context ctx) : Package(ctx){};
50
+
51
+ std::unique_ptr<TurboModuleFactoryDelegate> createTurboModuleFactoryDelegate() override {
52
+ return std::make_unique<BaseReactNativeTcpSocketPackageTurboModuleFactoryDelegate>();
53
+ }
54
+
55
+ std::vector<facebook::react::ComponentDescriptorProvider> createComponentDescriptorProviders() override {
56
+ return {
57
+ };
58
+ }
59
+
60
+ ComponentJSIBinderByString createComponentJSIBinderByName() override {
61
+ return {
62
+ };
63
+ };
64
+
65
+ EventEmitRequestHandlers createEventEmitRequestHandlers() override {
66
+ return {
67
+ std::make_shared<BaseReactNativeTcpSocketPackageEventEmitRequestHandler>(),
68
+ };
69
+ }
70
+ };
71
+
72
+ } // namespace rnoh
@@ -1,28 +1,28 @@
1
- /**
2
- * This code was generated by "react-native codegen-lib-harmony"
3
- */
4
-
5
- #include "TcpSocketModule.h"
6
-
7
- namespace rnoh {
8
- using namespace facebook;
9
-
10
- TcpSocketModule::TcpSocketModule(const ArkTSTurboModule::Context ctx, const std::string name) : ArkTSTurboModule(ctx, name) {
11
- methodMap_ = {
12
- ARK_METHOD_METADATA(listen, 2),
13
- ARK_METHOD_METADATA(close, 1),
14
- ARK_METHOD_METADATA(destroy, 1),
15
- ARK_METHOD_METADATA(end, 1),
16
- ARK_METHOD_METADATA(pause, 1),
17
- ARK_METHOD_METADATA(resume, 1),
18
- ARK_METHOD_METADATA(connect, 4),
19
- ARK_METHOD_METADATA(startTLS, 2),
20
- ARK_METHOD_METADATA(write, 3),
21
- ARK_METHOD_METADATA(setNoDelay, 2),
22
- ARK_METHOD_METADATA(setKeepAlive, 3),
23
- ARK_ASYNC_METHOD_METADATA(getPeerCertificate, 1),
24
- ARK_ASYNC_METHOD_METADATA(getCertificate, 1),
25
- };
26
- }
27
-
28
- } // namespace rnoh
1
+ /**
2
+ * This code was generated by "react-native codegen-lib-harmony"
3
+ */
4
+
5
+ #include "TcpSocketModule.h"
6
+
7
+ namespace rnoh {
8
+ using namespace facebook;
9
+
10
+ TcpSocketModule::TcpSocketModule(const ArkTSTurboModule::Context ctx, const std::string name) : ArkTSTurboModule(ctx, name) {
11
+ methodMap_ = {
12
+ ARK_METHOD_METADATA(listen, 2),
13
+ ARK_METHOD_METADATA(close, 1),
14
+ ARK_METHOD_METADATA(destroy, 1),
15
+ ARK_METHOD_METADATA(end, 1),
16
+ ARK_METHOD_METADATA(pause, 1),
17
+ ARK_METHOD_METADATA(resume, 1),
18
+ ARK_METHOD_METADATA(connect, 4),
19
+ ARK_METHOD_METADATA(startTLS, 2),
20
+ ARK_METHOD_METADATA(write, 3),
21
+ ARK_METHOD_METADATA(setNoDelay, 2),
22
+ ARK_METHOD_METADATA(setKeepAlive, 3),
23
+ ARK_ASYNC_METHOD_METADATA(getPeerCertificate, 1),
24
+ ARK_ASYNC_METHOD_METADATA(getCertificate, 1),
25
+ };
26
+ }
27
+
28
+ } // namespace rnoh
@@ -1,16 +1,16 @@
1
- /**
2
- * This code was generated by "react-native codegen-lib-harmony"
3
- */
4
-
5
- #pragma once
6
-
7
- #include "RNOH/ArkTSTurboModule.h"
8
-
9
- namespace rnoh {
10
-
11
- class JSI_EXPORT TcpSocketModule : public ArkTSTurboModule {
12
- public:
13
- TcpSocketModule(const ArkTSTurboModule::Context ctx, const std::string name);
14
- };
15
-
16
- } // namespace rnoh
1
+ /**
2
+ * This code was generated by "react-native codegen-lib-harmony"
3
+ */
4
+
5
+ #pragma once
6
+
7
+ #include "RNOH/ArkTSTurboModule.h"
8
+
9
+ namespace rnoh {
10
+
11
+ class JSI_EXPORT TcpSocketModule : public ArkTSTurboModule {
12
+ public:
13
+ TcpSocketModule(const ArkTSTurboModule::Context ctx, const std::string name);
14
+ };
15
+
16
+ } // namespace rnoh
@@ -1,24 +1,24 @@
1
-
2
- /**
3
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
- *
5
- * Do not edit this file as changes may cause incorrect behavior and will be lost
6
- * once the code is regenerated.
7
- *
8
- * @generated by codegen project: GenerateComponentDescriptorH.js
9
- */
10
-
11
- #pragma once
12
-
13
- #include "ShadowNodes.h"
14
- #include <react/renderer/core/ConcreteComponentDescriptor.h>
15
- #include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
16
-
17
- namespace facebook::react {
18
-
19
-
20
-
21
- void react_native_tcp_socket_registerComponentDescriptorsFromCodegen(
22
- std::shared_ptr<const ComponentDescriptorProviderRegistry> registry);
23
-
24
- } // namespace facebook::react
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateComponentDescriptorH.js
9
+ */
10
+
11
+ #pragma once
12
+
13
+ #include "ShadowNodes.h"
14
+ #include <react/renderer/core/ConcreteComponentDescriptor.h>
15
+ #include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
16
+
17
+ namespace facebook::react {
18
+
19
+
20
+
21
+ void react_native_tcp_socket_registerComponentDescriptorsFromCodegen(
22
+ std::shared_ptr<const ComponentDescriptorProviderRegistry> registry);
23
+
24
+ } // namespace facebook::react
@@ -1,16 +1,16 @@
1
-
2
- /**
3
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
- *
5
- * Do not edit this file as changes may cause incorrect behavior and will be lost
6
- * once the code is regenerated.
7
- *
8
- * @generated by codegen project: GenerateEventEmitterCpp.js
9
- */
10
-
11
- #include "EventEmitters.h"
12
-
13
-
14
- namespace facebook::react {
15
-
16
- } // namespace facebook::react
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateEventEmitterCpp.js
9
+ */
10
+
11
+ #include "EventEmitters.h"
12
+
13
+
14
+ namespace facebook::react {
15
+
16
+ } // namespace facebook::react
@@ -1,17 +1,17 @@
1
-
2
- /**
3
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
- *
5
- * Do not edit this file as changes may cause incorrect behavior and will be lost
6
- * once the code is regenerated.
7
- *
8
- * @generated by codegen project: GenerateEventEmitterH.js
9
- */
10
- #pragma once
11
-
12
- #include <react/renderer/components/view/ViewEventEmitter.h>
13
-
14
-
15
- namespace facebook::react {
16
-
17
- } // namespace facebook::react
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateEventEmitterH.js
9
+ */
10
+ #pragma once
11
+
12
+ #include <react/renderer/components/view/ViewEventEmitter.h>
13
+
14
+
15
+ namespace facebook::react {
16
+
17
+ } // namespace facebook::react
@@ -1,19 +1,19 @@
1
-
2
- /**
3
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
- *
5
- * Do not edit this file as changes may cause incorrect behavior and will be lost
6
- * once the code is regenerated.
7
- *
8
- * @generated by codegen project: GeneratePropsCpp.js
9
- */
10
-
11
- #include "Props.h"
12
- #include <react/renderer/core/PropsParserContext.h>
13
- #include <react/renderer/core/propsConversions.h>
14
-
15
- namespace facebook::react {
16
-
17
-
18
-
19
- } // namespace facebook::react
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GeneratePropsCpp.js
9
+ */
10
+
11
+ #include "Props.h"
12
+ #include <react/renderer/core/PropsParserContext.h>
13
+ #include <react/renderer/core/propsConversions.h>
14
+
15
+ namespace facebook::react {
16
+
17
+
18
+
19
+ } // namespace facebook::react
@@ -1,18 +1,18 @@
1
-
2
- /**
3
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
- *
5
- * Do not edit this file as changes may cause incorrect behavior and will be lost
6
- * once the code is regenerated.
7
- *
8
- * @generated by codegen project: GeneratePropsH.js
9
- */
10
- #pragma once
11
-
12
-
13
-
14
- namespace facebook::react {
15
-
16
-
17
-
18
- } // namespace facebook::react
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GeneratePropsH.js
9
+ */
10
+ #pragma once
11
+
12
+
13
+
14
+ namespace facebook::react {
15
+
16
+
17
+
18
+ } // namespace facebook::react
@@ -1,17 +1,17 @@
1
-
2
- /**
3
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
- *
5
- * Do not edit this file as changes may cause incorrect behavior and will be lost
6
- * once the code is regenerated.
7
- *
8
- * @generated by codegen project: GenerateShadowNodeCpp.js
9
- */
10
-
11
- #include "ShadowNodes.h"
12
-
13
- namespace facebook::react {
14
-
15
-
16
-
17
- } // namespace facebook::react
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateShadowNodeCpp.js
9
+ */
10
+
11
+ #include "ShadowNodes.h"
12
+
13
+ namespace facebook::react {
14
+
15
+
16
+
17
+ } // namespace facebook::react
@@ -1,23 +1,23 @@
1
-
2
- /**
3
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
- *
5
- * Do not edit this file as changes may cause incorrect behavior and will be lost
6
- * once the code is regenerated.
7
- *
8
- * @generated by codegen project: GenerateShadowNodeH.js
9
- */
10
-
11
- #pragma once
12
-
13
- #include "EventEmitters.h"
14
- #include "Props.h"
15
- #include "States.h"
16
- #include <react/renderer/components/view/ConcreteViewShadowNode.h>
17
- #include <jsi/jsi.h>
18
-
19
- namespace facebook::react {
20
-
21
-
22
-
23
- } // namespace facebook::react
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateShadowNodeH.js
9
+ */
10
+
11
+ #pragma once
12
+
13
+ #include "EventEmitters.h"
14
+ #include "Props.h"
15
+ #include "States.h"
16
+ #include <react/renderer/components/view/ConcreteViewShadowNode.h>
17
+ #include <jsi/jsi.h>
18
+
19
+ namespace facebook::react {
20
+
21
+
22
+
23
+ } // namespace facebook::react
@@ -1,16 +1,16 @@
1
-
2
- /**
3
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
- *
5
- * Do not edit this file as changes may cause incorrect behavior and will be lost
6
- * once the code is regenerated.
7
- *
8
- * @generated by codegen project: GenerateStateCpp.js
9
- */
10
- #include "States.h"
11
-
12
- namespace facebook::react {
13
-
14
-
15
-
16
- } // namespace facebook::react
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateStateCpp.js
9
+ */
10
+ #include "States.h"
11
+
12
+ namespace facebook::react {
13
+
14
+
15
+
16
+ } // namespace facebook::react
@@ -1,19 +1,19 @@
1
- /**
2
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
- *
4
- * Do not edit this file as changes may cause incorrect behavior and will be lost
5
- * once the code is regenerated.
6
- *
7
- * @generated by codegen project: GenerateStateH.js
8
- */
9
- #pragma once
10
-
11
- #ifdef ANDROID
12
- #include <folly/dynamic.h>
13
- #endif
14
-
15
- namespace facebook::react {
16
-
17
-
18
-
1
+ /**
2
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
+ *
4
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
5
+ * once the code is regenerated.
6
+ *
7
+ * @generated by codegen project: GenerateStateH.js
8
+ */
9
+ #pragma once
10
+
11
+ #ifdef ANDROID
12
+ #include <folly/dynamic.h>
13
+ #endif
14
+
15
+ namespace facebook::react {
16
+
17
+
18
+
19
19
  } // namespace facebook::react
@@ -1,5 +1,5 @@
1
-
2
- /**
3
- */
4
-
5
- export {}
1
+
2
+ /**
3
+ */
4
+
5
+ export {}
@@ -1,5 +1,5 @@
1
- /**
2
- * This code was generated by "react-native codegen-lib-harmony"
3
- */
4
-
5
- export * from "./ts"
1
+ /**
2
+ * This code was generated by "react-native codegen-lib-harmony"
3
+ */
4
+
5
+ export * from "./ts"
@@ -1,6 +1,6 @@
1
- /**
2
- * This code was generated by "react-native codegen-lib-harmony"
3
- */
4
-
5
- export * as RNC from "./components/ts"
6
- export * as TM from "./turboModules/ts"
1
+ /**
2
+ * This code was generated by "react-native codegen-lib-harmony"
3
+ */
4
+
5
+ export * as RNC from "./components/ts"
6
+ export * as TM from "./turboModules/ts"
@@ -1,38 +1,38 @@
1
- /**
2
- * This code was generated by "react-native codegen-lib-harmony"
3
- */
4
-
5
- import { Tag } from "@rnoh/react-native-openharmony/ts"
6
-
7
- export namespace TcpSocketModule {
8
- export const NAME = 'TcpSocketModule' as const
9
-
10
- export interface Spec {
11
- listen(cId: number, options: Object): void;
12
-
13
- close(cid: number): void;
14
-
15
- destroy(cid: number): void;
16
-
17
- end(cid: number): void;
18
-
19
- pause(cid: number): void;
20
-
21
- resume(cid: number): void;
22
-
23
- connect(cId: number, host: string, port: number, options: Object): void;
24
-
25
- startTLS(cId: number, tlsOptions: Object): void;
26
-
27
- write(cId: number, base64String: string, msgId: number): void;
28
-
29
- setNoDelay(cId: number, noDelay: boolean): void;
30
-
31
- setKeepAlive(cId: number, enable: boolean, initialDelay: number): void;
32
-
33
- getPeerCertificate(cId: number): Promise<string>;
34
-
35
- getCertificate(cId: number): Promise<string>;
36
-
37
- }
38
- }
1
+ /**
2
+ * This code was generated by "react-native codegen-lib-harmony"
3
+ */
4
+
5
+ import { Tag } from "@rnoh/react-native-openharmony/ts"
6
+
7
+ export namespace TcpSocketModule {
8
+ export const NAME = 'TcpSocketModule' as const
9
+
10
+ export interface Spec {
11
+ listen(cId: number, options: Object): void;
12
+
13
+ close(cid: number): void;
14
+
15
+ destroy(cid: number): void;
16
+
17
+ end(cid: number): void;
18
+
19
+ pause(cid: number): void;
20
+
21
+ resume(cid: number): void;
22
+
23
+ connect(cId: number, host: string, port: number, options: Object): void;
24
+
25
+ startTLS(cId: number, tlsOptions: Object): void;
26
+
27
+ write(cId: number, base64String: string, msgId: number): void;
28
+
29
+ setNoDelay(cId: number, noDelay: boolean): void;
30
+
31
+ setKeepAlive(cId: number, enable: boolean, initialDelay: number): void;
32
+
33
+ getPeerCertificate(cId: number): Promise<string>;
34
+
35
+ getCertificate(cId: number): Promise<string>;
36
+
37
+ }
38
+ }
@@ -1,5 +1,5 @@
1
- /**
2
- * This code was generated by "react-native codegen-lib-harmony"
3
- */
4
-
5
- export * from "./TcpSocketModule"
1
+ /**
2
+ * This code was generated by "react-native codegen-lib-harmony"
3
+ */
4
+
5
+ export * from "./TcpSocketModule"
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@react-native-ohos/react-native-tcp-socket",
3
3
  "title": "React Native Tcp Socket",
4
- "version": "6.3.1-rc.1",
4
+ "version": "6.3.1-rc.3",
5
5
  "description": "React Native TCP socket API for HarmonyOS with SSL/TLS support",
6
6
  "main": "src/index.js",
7
7
  "types": "lib/types/index.d.ts",
package/src/Server.js CHANGED
@@ -105,6 +105,7 @@ export default class Server extends EventEmitter {
105
105
  port: options.port,
106
106
  host: options.host || '0.0.0.0',
107
107
  reuseAddress: options.reuseAddress,
108
+ tls: options.tls
108
109
  };
109
110
  if (typeof callback_or_host === 'function') {
110
111
  cb = callback_or_host;