@libp2p/tcp 9.0.5-d10506189 → 9.0.6
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/README.md +3 -3
- package/dist/typedoc-urls.json +16 -0
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ const transport = tcp()()
|
|
|
28
28
|
const listener = transport.createListener({
|
|
29
29
|
upgrader,
|
|
30
30
|
handler: (socket) => {
|
|
31
|
-
console.log('new connection opened')
|
|
31
|
+
console.this.log('new connection opened')
|
|
32
32
|
pipe(
|
|
33
33
|
['hello', ' ', 'World!'],
|
|
34
34
|
socket
|
|
@@ -38,14 +38,14 @@ const listener = transport.createListener({
|
|
|
38
38
|
|
|
39
39
|
const addr = multiaddr('/ip4/127.0.0.1/tcp/9090')
|
|
40
40
|
await listener.listen(addr)
|
|
41
|
-
console.log('listening')
|
|
41
|
+
console.this.log('listening')
|
|
42
42
|
|
|
43
43
|
const socket = await transport.dial(addr, { upgrader })
|
|
44
44
|
const values = await pipe(
|
|
45
45
|
socket,
|
|
46
46
|
all
|
|
47
47
|
)
|
|
48
|
-
console.log(`Value: ${values.toString()}`)
|
|
48
|
+
console.this.log(`Value: ${values.toString()}`)
|
|
49
49
|
|
|
50
50
|
// Close connection after reading
|
|
51
51
|
await listener.close()
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"TCPComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_tcp.TCPComponents.html",
|
|
3
|
+
".:TCPComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_tcp.TCPComponents.html",
|
|
4
|
+
"TCPCreateListenerOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_tcp.TCPCreateListenerOptions.html",
|
|
5
|
+
".:TCPCreateListenerOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_tcp.TCPCreateListenerOptions.html",
|
|
6
|
+
"TCPDialOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_tcp.TCPDialOptions.html",
|
|
7
|
+
".:TCPDialOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_tcp.TCPDialOptions.html",
|
|
8
|
+
"TCPMetrics": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_tcp.TCPMetrics.html",
|
|
9
|
+
".:TCPMetrics": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_tcp.TCPMetrics.html",
|
|
10
|
+
"TCPOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_tcp.TCPOptions.html",
|
|
11
|
+
".:TCPOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_tcp.TCPOptions.html",
|
|
12
|
+
"TCPSocketOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_tcp.TCPSocketOptions.html",
|
|
13
|
+
".:TCPSocketOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_tcp.TCPSocketOptions.html",
|
|
14
|
+
"tcp": "https://libp2p.github.io/js-libp2p/functions/_libp2p_tcp.tcp.html",
|
|
15
|
+
".:tcp": "https://libp2p.github.io/js-libp2p/functions/_libp2p_tcp.tcp.html"
|
|
16
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libp2p/tcp",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.6",
|
|
4
4
|
"description": "A TCP transport for libp2p",
|
|
5
5
|
"license": "Apache-2.0 OR MIT",
|
|
6
6
|
"homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/transport-tcp#readme",
|
|
@@ -55,16 +55,16 @@
|
|
|
55
55
|
"test:electron-main": "aegir test -t electron-main"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@libp2p/interface": "1.0.1
|
|
59
|
-
"@libp2p/utils": "5.0.2
|
|
58
|
+
"@libp2p/interface": "^1.0.1",
|
|
59
|
+
"@libp2p/utils": "^5.0.2",
|
|
60
60
|
"@multiformats/mafmt": "^12.1.6",
|
|
61
61
|
"@multiformats/multiaddr": "^12.1.10",
|
|
62
62
|
"@types/sinon": "^17.0.0",
|
|
63
63
|
"stream-to-it": "^0.2.2"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@libp2p/interface-compliance-tests": "5.0.
|
|
67
|
-
"@libp2p/logger": "4.0.1
|
|
66
|
+
"@libp2p/interface-compliance-tests": "^5.0.6",
|
|
67
|
+
"@libp2p/logger": "^4.0.1",
|
|
68
68
|
"aegir": "^41.0.2",
|
|
69
69
|
"it-all": "^3.0.3",
|
|
70
70
|
"it-pipe": "^3.0.1",
|