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

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 (61) hide show
  1. package/LICENSE +21 -21
  2. package/README.OpenSource +10 -10
  3. package/README.md +12 -12
  4. package/harmony/tcp_socket/BuildProfile.ets +16 -16
  5. package/harmony/tcp_socket/Index.ets +5 -5
  6. package/harmony/tcp_socket/build-profile.json5 +31 -31
  7. package/harmony/tcp_socket/hvigorfile.ts +6 -6
  8. package/harmony/tcp_socket/obfuscation-rules.txt +22 -22
  9. package/harmony/tcp_socket/oh-package.json5 +11 -11
  10. package/harmony/tcp_socket/src/main/cpp/CMakeLists.txt +8 -8
  11. package/harmony/tcp_socket/src/main/cpp/TcpSocketPackage.h +18 -18
  12. package/harmony/tcp_socket/src/main/cpp/generated/RNOH/generated/BaseReactNativeTcpSocketPackage.h +72 -72
  13. package/harmony/tcp_socket/src/main/cpp/generated/RNOH/generated/turbo_modules/TcpSocketModule.cpp +28 -28
  14. package/harmony/tcp_socket/src/main/cpp/generated/RNOH/generated/turbo_modules/TcpSocketModule.h +16 -16
  15. package/harmony/tcp_socket/src/main/cpp/generated/react/renderer/components/react_native_tcp_socket/ComponentDescriptors.h +24 -24
  16. package/harmony/tcp_socket/src/main/cpp/generated/react/renderer/components/react_native_tcp_socket/EventEmitters.cpp +16 -16
  17. package/harmony/tcp_socket/src/main/cpp/generated/react/renderer/components/react_native_tcp_socket/EventEmitters.h +17 -17
  18. package/harmony/tcp_socket/src/main/cpp/generated/react/renderer/components/react_native_tcp_socket/Props.cpp +19 -19
  19. package/harmony/tcp_socket/src/main/cpp/generated/react/renderer/components/react_native_tcp_socket/Props.h +18 -18
  20. package/harmony/tcp_socket/src/main/cpp/generated/react/renderer/components/react_native_tcp_socket/ShadowNodes.cpp +17 -17
  21. package/harmony/tcp_socket/src/main/cpp/generated/react/renderer/components/react_native_tcp_socket/ShadowNodes.h +23 -23
  22. package/harmony/tcp_socket/src/main/cpp/generated/react/renderer/components/react_native_tcp_socket/States.cpp +16 -16
  23. package/harmony/tcp_socket/src/main/cpp/generated/react/renderer/components/react_native_tcp_socket/States.h +18 -18
  24. package/harmony/tcp_socket/src/main/ets/Logger.ts +45 -45
  25. package/harmony/tcp_socket/src/main/ets/TcpEventListener.ts +120 -120
  26. package/harmony/tcp_socket/src/main/ets/TcpSocket.ts +16 -16
  27. package/harmony/tcp_socket/src/main/ets/TcpSocketClient.ts +443 -443
  28. package/harmony/tcp_socket/src/main/ets/TcpSocketPackage.ts +27 -27
  29. package/harmony/tcp_socket/src/main/ets/TcpSocketServer.ts +150 -150
  30. package/harmony/tcp_socket/src/main/ets/TcpSocketTurboModule.ts +224 -224
  31. package/harmony/tcp_socket/src/main/ets/generated/components/ts.ts +5 -5
  32. package/harmony/tcp_socket/src/main/ets/generated/index.ets +5 -5
  33. package/harmony/tcp_socket/src/main/ets/generated/ts.ts +6 -6
  34. package/harmony/tcp_socket/src/main/ets/generated/turboModules/TcpSocketModule.ts +38 -38
  35. package/harmony/tcp_socket/src/main/ets/generated/turboModules/ts.ts +5 -5
  36. package/harmony/tcp_socket/src/main/module.json5 +11 -11
  37. package/harmony/tcp_socket/src/main/resources/base/element/string.json +8 -8
  38. package/harmony/tcp_socket/src/main/resources/en_US/element/string.json +8 -8
  39. package/harmony/tcp_socket/src/main/resources/zh_CN/element/string.json +8 -8
  40. package/harmony/tcp_socket/src/ohosTest/ets/test/Ability.test.ets +34 -34
  41. package/harmony/tcp_socket/src/ohosTest/ets/test/List.test.ets +4 -4
  42. package/harmony/tcp_socket/src/ohosTest/module.json5 +13 -13
  43. package/harmony/tcp_socket/src/test/List.test.ets +4 -4
  44. package/harmony/tcp_socket/src/test/LocalUnit.test.ets +32 -32
  45. package/harmony/tcp_socket/ts.ts +6 -6
  46. package/harmony/tcp_socket.har +0 -0
  47. package/lib/types/Globals.d.ts +2 -2
  48. package/lib/types/Server.d.ts +138 -138
  49. package/lib/types/Socket.d.ts +272 -276
  50. package/lib/types/TLSServer.d.ts +28 -47
  51. package/lib/types/TLSSocket.d.ts +50 -50
  52. package/lib/types/index.d.ts +81 -81
  53. package/package.json +76 -76
  54. package/src/Globals.js +12 -12
  55. package/src/Server.js +271 -271
  56. package/src/Socket.js +513 -513
  57. package/src/TLSServer.js +70 -70
  58. package/src/TLSSocket.js +93 -93
  59. package/src/TcpSocketModule.ts +39 -39
  60. package/src/index.js +144 -144
  61. package/lib/types/TcpSocketModule.d.ts +0 -18
@@ -1,35 +1,35 @@
1
- import { hilog } from '@kit.PerformanceAnalysisKit';
2
- import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
3
-
4
- export default function abilityTest() {
5
- describe('ActsAbilityTest', () => {
6
- // Defines a test suite. Two parameters are supported: test suite name and test suite function.
7
- beforeAll(() => {
8
- // Presets an action, which is performed only once before all test cases of the test suite start.
9
- // This API supports only one parameter: preset action function.
10
- })
11
- beforeEach(() => {
12
- // Presets an action, which is performed before each unit test case starts.
13
- // The number of execution times is the same as the number of test cases defined by **it**.
14
- // This API supports only one parameter: preset action function.
15
- })
16
- afterEach(() => {
17
- // Presets a clear action, which is performed after each unit test case ends.
18
- // The number of execution times is the same as the number of test cases defined by **it**.
19
- // This API supports only one parameter: clear action function.
20
- })
21
- afterAll(() => {
22
- // Presets a clear action, which is performed after all test cases of the test suite end.
23
- // This API supports only one parameter: clear action function.
24
- })
25
- it('assertContain', 0, () => {
26
- // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function.
27
- hilog.info(0x0000, 'testTag', '%{public}s', 'it begin');
28
- let a = 'abc';
29
- let b = 'b';
30
- // Defines a variety of assertion methods, which are used to declare expected boolean conditions.
31
- expect(a).assertContain(b);
32
- expect(a).assertEqual(a);
33
- })
34
- })
1
+ import { hilog } from '@kit.PerformanceAnalysisKit';
2
+ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
3
+
4
+ export default function abilityTest() {
5
+ describe('ActsAbilityTest', () => {
6
+ // Defines a test suite. Two parameters are supported: test suite name and test suite function.
7
+ beforeAll(() => {
8
+ // Presets an action, which is performed only once before all test cases of the test suite start.
9
+ // This API supports only one parameter: preset action function.
10
+ })
11
+ beforeEach(() => {
12
+ // Presets an action, which is performed before each unit test case starts.
13
+ // The number of execution times is the same as the number of test cases defined by **it**.
14
+ // This API supports only one parameter: preset action function.
15
+ })
16
+ afterEach(() => {
17
+ // Presets a clear action, which is performed after each unit test case ends.
18
+ // The number of execution times is the same as the number of test cases defined by **it**.
19
+ // This API supports only one parameter: clear action function.
20
+ })
21
+ afterAll(() => {
22
+ // Presets a clear action, which is performed after all test cases of the test suite end.
23
+ // This API supports only one parameter: clear action function.
24
+ })
25
+ it('assertContain', 0, () => {
26
+ // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function.
27
+ hilog.info(0x0000, 'testTag', '%{public}s', 'it begin');
28
+ let a = 'abc';
29
+ let b = 'b';
30
+ // Defines a variety of assertion methods, which are used to declare expected boolean conditions.
31
+ expect(a).assertContain(b);
32
+ expect(a).assertEqual(a);
33
+ })
34
+ })
35
35
  }
@@ -1,5 +1,5 @@
1
- import abilityTest from './Ability.test';
2
-
3
- export default function testsuite() {
4
- abilityTest();
1
+ import abilityTest from './Ability.test';
2
+
3
+ export default function testsuite() {
4
+ abilityTest();
5
5
  }
@@ -1,13 +1,13 @@
1
- {
2
- "module": {
3
- "name": "tcp_socket_test",
4
- "type": "feature",
5
- "deviceTypes": [
6
- "default",
7
- "tablet",
8
- "2in1"
9
- ],
10
- "deliveryWithInstall": true,
11
- "installationFree": false
12
- }
13
- }
1
+ {
2
+ "module": {
3
+ "name": "tcp_socket_test",
4
+ "type": "feature",
5
+ "deviceTypes": [
6
+ "default",
7
+ "tablet",
8
+ "2in1"
9
+ ],
10
+ "deliveryWithInstall": true,
11
+ "installationFree": false
12
+ }
13
+ }
@@ -1,5 +1,5 @@
1
- import localUnitTest from './LocalUnit.test';
2
-
3
- export default function testsuite() {
4
- localUnitTest();
1
+ import localUnitTest from './LocalUnit.test';
2
+
3
+ export default function testsuite() {
4
+ localUnitTest();
5
5
  }
@@ -1,33 +1,33 @@
1
- import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
2
-
3
- export default function localUnitTest() {
4
- describe('localUnitTest', () => {
5
- // Defines a test suite. Two parameters are supported: test suite name and test suite function.
6
- beforeAll(() => {
7
- // Presets an action, which is performed only once before all test cases of the test suite start.
8
- // This API supports only one parameter: preset action function.
9
- });
10
- beforeEach(() => {
11
- // Presets an action, which is performed before each unit test case starts.
12
- // The number of execution times is the same as the number of test cases defined by **it**.
13
- // This API supports only one parameter: preset action function.
14
- });
15
- afterEach(() => {
16
- // Presets a clear action, which is performed after each unit test case ends.
17
- // The number of execution times is the same as the number of test cases defined by **it**.
18
- // This API supports only one parameter: clear action function.
19
- });
20
- afterAll(() => {
21
- // Presets a clear action, which is performed after all test cases of the test suite end.
22
- // This API supports only one parameter: clear action function.
23
- });
24
- it('assertContain', 0, () => {
25
- // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function.
26
- let a = 'abc';
27
- let b = 'b';
28
- // Defines a variety of assertion methods, which are used to declare expected boolean conditions.
29
- expect(a).assertContain(b);
30
- expect(a).assertEqual(a);
31
- });
32
- });
1
+ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
2
+
3
+ export default function localUnitTest() {
4
+ describe('localUnitTest', () => {
5
+ // Defines a test suite. Two parameters are supported: test suite name and test suite function.
6
+ beforeAll(() => {
7
+ // Presets an action, which is performed only once before all test cases of the test suite start.
8
+ // This API supports only one parameter: preset action function.
9
+ });
10
+ beforeEach(() => {
11
+ // Presets an action, which is performed before each unit test case starts.
12
+ // The number of execution times is the same as the number of test cases defined by **it**.
13
+ // This API supports only one parameter: preset action function.
14
+ });
15
+ afterEach(() => {
16
+ // Presets a clear action, which is performed after each unit test case ends.
17
+ // The number of execution times is the same as the number of test cases defined by **it**.
18
+ // This API supports only one parameter: clear action function.
19
+ });
20
+ afterAll(() => {
21
+ // Presets a clear action, which is performed after all test cases of the test suite end.
22
+ // This API supports only one parameter: clear action function.
23
+ });
24
+ it('assertContain', 0, () => {
25
+ // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function.
26
+ let a = 'abc';
27
+ let b = 'b';
28
+ // Defines a variety of assertion methods, which are used to declare expected boolean conditions.
29
+ expect(a).assertContain(b);
30
+ expect(a).assertEqual(a);
31
+ });
32
+ });
33
33
  }
@@ -1,7 +1,7 @@
1
- /*
2
- * Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
3
- * Use of this source code is governed by a MIT license that can be
4
- * found in the LICENSE file.
5
- */
6
- export * from "./src/main/ets/TcpSocketPackage";
1
+ /*
2
+ * Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
3
+ * Use of this source code is governed by a MIT license that can be
4
+ * found in the LICENSE file.
5
+ */
6
+ export * from "./src/main/ets/TcpSocketPackage";
7
7
  export * from "./src/main/ets/TcpSocketTurboModule";
Binary file
@@ -1,2 +1,2 @@
1
- export const nativeEventEmitter: import("react-native").DeviceEventEmitterStatic;
2
- export function getNextId(): number;
1
+ export const nativeEventEmitter: import("react-native").DeviceEventEmitter;
2
+ export function getNextId(): number;
@@ -1,138 +1,138 @@
1
- /**
2
- * @typedef {object} ServerOptions
3
- * @property {boolean} [noDelay]
4
- * @property {boolean} [keepAlive]
5
- * @property {number} [keepAliveInitialDelay]
6
- * @property {boolean} [allowHalfOpen]
7
- * @property {boolean} [pauseOnConnect]
8
- *
9
- * @typedef {import('./TLSSocket').default} TLSSocket
10
- *
11
- * @typedef {object} ServerEvents
12
- * @property {() => void} close
13
- * @property {(socket: Socket) => void} connection
14
- * @property {() => void} listening
15
- * @property {(err: Error) => void} error
16
- * @property {(tlsSocket: TLSSocket) => void} secureConnection
17
- *
18
- * @extends {EventEmitter<ServerEvents, any>}
19
- */
20
- export default class Server extends EventEmitter<ServerEvents, any> {
21
- /**
22
- * @param {ServerOptions | ((socket: Socket) => void)} [options] Server options or connection listener
23
- * @param {(socket: Socket) => void} [connectionCallback] Automatically set as a listener for the `'connection'` event.
24
- */
25
- constructor(options?: ServerOptions | ((socket: Socket) => void) | undefined, connectionCallback?: ((socket: Socket) => void) | undefined);
26
- /** @protected @readonly */
27
- protected readonly _id: number;
28
- /** @protected @readonly */
29
- protected readonly _eventEmitter: import("react-native").DeviceEventEmitterStatic;
30
- /** @private @type {Set<Socket>} */
31
- private _connections;
32
- /** @private */
33
- private _localAddress;
34
- /** @private */
35
- private _localPort;
36
- /** @private */
37
- private _localFamily;
38
- /** @private @type {ServerOptions} */
39
- private _serverOptions;
40
- listening: boolean;
41
- /**
42
- * Start a server listening for connections.
43
- *
44
- * This function is asynchronous. When the server starts listening, the `'listening'` event will be emitted.
45
- * The last parameter `callback` will be added as a listener for the `'listening'` event.
46
- *
47
- * The `server.listen()` method can be called again if and only if there was an error during the first
48
- * `server.listen()` call or `server.close()` has been called. Otherwise, an `ERR_SERVER_ALREADY_LISTEN`
49
- * error will be thrown.
50
- *
51
- * @param {{ port: number; host?: string; reuseAddress?: boolean} | number} options Options or port
52
- * @param {string | (() => void)} [callback_or_host] Callback or host string
53
- * @param {() => void} [callback] Callback function
54
- * @returns {Server}
55
- */
56
- listen(options: {
57
- port: number;
58
- host?: string;
59
- reuseAddress?: boolean;
60
- } | number, callback_or_host?: string | (() => void) | undefined, callback?: (() => void) | undefined): Server;
61
- /**
62
- * Asynchronously get the number of concurrent connections on the server.
63
- *
64
- * Callback should take two arguments `err` and `count`.
65
- *
66
- * @param {(err: Error | null, count: number) => void} callback
67
- * @returns {Server}
68
- */
69
- getConnections(callback: (err: Error | null, count: number) => void): Server;
70
- /**
71
- * Stops the server from accepting new connections and keeps existing connections.
72
- * This function is asynchronous, the server is finally closed when all connections are ended and the server emits a `'close'` event.
73
- * The optional callback will be called once the `'close'` event occurs. Unlike that event, it will be called with an `Error` as its
74
- * only argument if the server was not open when it was closed.
75
- *
76
- * @param {(err?: Error) => void} [callback] Called when the server is closed.
77
- * @returns {Server}
78
- */
79
- close(callback?: ((err?: Error) => void) | undefined): Server;
80
- /**
81
- * Returns the bound `address`, the address `family` name, and `port` of the server as reported by the operating system if listening
82
- * on an IP socket (useful to find which port was assigned when getting an OS-assigned address):
83
- * `{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`.
84
- *
85
- * @returns {import('./Socket').AddressInfo | null}
86
- */
87
- address(): import('./Socket').AddressInfo | null;
88
- ref(): Server;
89
- unref(): Server;
90
- /**
91
- * @private
92
- */
93
- private _registerEvents;
94
- _listeningListener: import("react-native").EmitterSubscription | undefined;
95
- _errorListener: import("react-native").EmitterSubscription | undefined;
96
- _connectionsListener: import("react-native").EmitterSubscription | undefined;
97
- /**
98
- * @private
99
- */
100
- private _setDisconnected;
101
- /**
102
- * @protected
103
- * @param {Socket} socket
104
- */
105
- protected _addConnection(socket: Socket): void;
106
- /**
107
- * @protected
108
- * @param {{ id: number; connection: import('./Socket').NativeConnectionInfo; }} info
109
- * @returns {Socket}
110
- */
111
- protected _buildSocket(info: {
112
- id: number;
113
- connection: import('./Socket').NativeConnectionInfo;
114
- }): Socket;
115
- /**
116
- * Apply server socket options to a newly connected socket
117
- * @param {Socket} socket
118
- * @private
119
- */
120
- private _applySocketOptions;
121
- }
122
- export type ServerOptions = {
123
- noDelay?: boolean | undefined;
124
- keepAlive?: boolean | undefined;
125
- keepAliveInitialDelay?: number | undefined;
126
- allowHalfOpen?: boolean | undefined;
127
- pauseOnConnect?: boolean | undefined;
128
- };
129
- export type TLSSocket = import('./TLSSocket').default;
130
- export type ServerEvents = {
131
- close: () => void;
132
- connection: (socket: Socket) => void;
133
- listening: () => void;
134
- error: (err: Error) => void;
135
- secureConnection: (tlsSocket: TLSSocket) => void;
136
- };
137
- import EventEmitter from "eventemitter3";
138
- import Socket from "./Socket";
1
+ /**
2
+ * @typedef {object} ServerOptions
3
+ * @property {boolean} [noDelay]
4
+ * @property {boolean} [keepAlive]
5
+ * @property {number} [keepAliveInitialDelay]
6
+ * @property {boolean} [allowHalfOpen]
7
+ * @property {boolean} [pauseOnConnect]
8
+ *
9
+ * @typedef {import('./TLSSocket').default} TLSSocket
10
+ *
11
+ * @typedef {object} ServerEvents
12
+ * @property {() => void} close
13
+ * @property {(socket: Socket) => void} connection
14
+ * @property {() => void} listening
15
+ * @property {(err: Error) => void} error
16
+ * @property {(tlsSocket: TLSSocket) => void} secureConnection
17
+ *
18
+ * @extends {EventEmitter<ServerEvents, any>}
19
+ */
20
+ export default class Server extends EventEmitter<ServerEvents, any> {
21
+ /**
22
+ * @param {ServerOptions | ((socket: Socket) => void)} [options] Server options or connection listener
23
+ * @param {(socket: Socket) => void} [connectionCallback] Automatically set as a listener for the `'connection'` event.
24
+ */
25
+ constructor(options?: ServerOptions | ((socket: Socket) => void) | undefined, connectionCallback?: ((socket: Socket) => void) | undefined);
26
+ /** @protected @readonly */
27
+ protected readonly _id: number;
28
+ /** @protected @readonly */
29
+ protected readonly _eventEmitter: import("react-native").EventEmitter;
30
+ /** @private @type {Set<Socket>} */
31
+ private _connections;
32
+ /** @private */
33
+ private _localAddress;
34
+ /** @private */
35
+ private _localPort;
36
+ /** @private */
37
+ private _localFamily;
38
+ /** @private @type {ServerOptions} */
39
+ private _serverOptions;
40
+ listening: boolean;
41
+ /**
42
+ * Start a server listening for connections.
43
+ *
44
+ * This function is asynchronous. When the server starts listening, the `'listening'` event will be emitted.
45
+ * The last parameter `callback` will be added as a listener for the `'listening'` event.
46
+ *
47
+ * The `server.listen()` method can be called again if and only if there was an error during the first
48
+ * `server.listen()` call or `server.close()` has been called. Otherwise, an `ERR_SERVER_ALREADY_LISTEN`
49
+ * error will be thrown.
50
+ *
51
+ * @param {{ port: number; host?: string; reuseAddress?: boolean} | number} options Options or port
52
+ * @param {string | (() => void)} [callback_or_host] Callback or host string
53
+ * @param {() => void} [callback] Callback function
54
+ * @returns {Server}
55
+ */
56
+ listen(options: {
57
+ port: number;
58
+ host?: string;
59
+ reuseAddress?: boolean;
60
+ } | number, callback_or_host?: string | (() => void) | undefined, callback?: (() => void) | undefined): Server;
61
+ /**
62
+ * Asynchronously get the number of concurrent connections on the server.
63
+ *
64
+ * Callback should take two arguments `err` and `count`.
65
+ *
66
+ * @param {(err: Error | null, count: number) => void} callback
67
+ * @returns {Server}
68
+ */
69
+ getConnections(callback: (err: Error | null, count: number) => void): Server;
70
+ /**
71
+ * Stops the server from accepting new connections and keeps existing connections.
72
+ * This function is asynchronous, the server is finally closed when all connections are ended and the server emits a `'close'` event.
73
+ * The optional callback will be called once the `'close'` event occurs. Unlike that event, it will be called with an `Error` as its
74
+ * only argument if the server was not open when it was closed.
75
+ *
76
+ * @param {(err?: Error) => void} [callback] Called when the server is closed.
77
+ * @returns {Server}
78
+ */
79
+ close(callback?: ((err?: Error | undefined) => void) | undefined): Server;
80
+ /**
81
+ * Returns the bound `address`, the address `family` name, and `port` of the server as reported by the operating system if listening
82
+ * on an IP socket (useful to find which port was assigned when getting an OS-assigned address):
83
+ * `{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`.
84
+ *
85
+ * @returns {import('./Socket').AddressInfo | null}
86
+ */
87
+ address(): import('./Socket').AddressInfo | null;
88
+ ref(): Server;
89
+ unref(): Server;
90
+ /**
91
+ * @private
92
+ */
93
+ private _registerEvents;
94
+ _listeningListener: import("react-native").EmitterSubscription | undefined;
95
+ _errorListener: import("react-native").EmitterSubscription | undefined;
96
+ _connectionsListener: import("react-native").EmitterSubscription | undefined;
97
+ /**
98
+ * @private
99
+ */
100
+ private _setDisconnected;
101
+ /**
102
+ * @protected
103
+ * @param {Socket} socket
104
+ */
105
+ protected _addConnection(socket: Socket): void;
106
+ /**
107
+ * @protected
108
+ * @param {{ id: number; connection: import('./Socket').NativeConnectionInfo; }} info
109
+ * @returns {Socket}
110
+ */
111
+ protected _buildSocket(info: {
112
+ id: number;
113
+ connection: import('./Socket').NativeConnectionInfo;
114
+ }): Socket;
115
+ /**
116
+ * Apply server socket options to a newly connected socket
117
+ * @param {Socket} socket
118
+ * @private
119
+ */
120
+ private _applySocketOptions;
121
+ }
122
+ export type ServerOptions = {
123
+ noDelay?: boolean | undefined;
124
+ keepAlive?: boolean | undefined;
125
+ keepAliveInitialDelay?: number | undefined;
126
+ allowHalfOpen?: boolean | undefined;
127
+ pauseOnConnect?: boolean | undefined;
128
+ };
129
+ export type TLSSocket = import("./TLSSocket").default;
130
+ export type ServerEvents = {
131
+ close: () => void;
132
+ connection: (socket: Socket) => void;
133
+ listening: () => void;
134
+ error: (err: Error) => void;
135
+ secureConnection: (tlsSocket: TLSSocket) => void;
136
+ };
137
+ import EventEmitter from "eventemitter3";
138
+ import Socket from "./Socket";