@onekeyfe/react-native-tcp-socket 3.0.179-alpha.2026101503 → 3.0.179-alpha.302
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/LICENSE +21 -0
- package/README.md +12 -0
- package/package.json +1 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019 Rapsssito
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -34,6 +34,18 @@ Do not assume Node.js socket methods are available on that wrapper. See
|
|
|
34
34
|
[src/index.tsx](src/index.tsx) for its behavior and
|
|
35
35
|
[src/NativeTcpSocket.ts](src/NativeTcpSocket.ts) for the native signature.
|
|
36
36
|
|
|
37
|
+
## Registering wrapper callbacks
|
|
38
|
+
|
|
39
|
+
The legacy wrapper accepts only `error` and `timeout` event handlers, each
|
|
40
|
+
stored as one current callback. Register them immediately on the returned shim
|
|
41
|
+
and call `destroy()` when the caller no longer wants completion callbacks.
|
|
42
|
+
No `data`, `write`, `end` or native socket handle is exported by this shim.
|
|
43
|
+
|
|
44
|
+
For a direct measurement use the named `NativeTcpSocket` promise API.
|
|
45
|
+
The wrapper's connection callback signals successful connection, without a
|
|
46
|
+
stream object or connection-time argument. Use the promise result when the
|
|
47
|
+
elapsed connection time is needed.
|
|
48
|
+
|
|
37
49
|
## Upstream attribution
|
|
38
50
|
|
|
39
51
|
First, a sincere thank-you to Rapsssito and the
|
package/package.json
CHANGED