@libp2p/tcp 10.0.10 → 10.0.11-32ca76fcb
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.
|
@@ -1,31 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @packageDocumentation
|
|
3
|
-
*
|
|
4
|
-
* A [libp2p transport](https://docs.libp2p.io/concepts/transports/overview/) based on the TCP networking stack.
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
*
|
|
8
|
-
* ```TypeScript
|
|
9
|
-
* import { createLibp2p } from 'libp2p'
|
|
10
|
-
* import { tcp } from '@libp2p/tcp'
|
|
11
|
-
* import { multiaddr } from '@multiformats/multiaddr'
|
|
12
|
-
*
|
|
13
|
-
* const node = await createLibp2p({
|
|
14
|
-
* transports: [
|
|
15
|
-
* tcp()
|
|
16
|
-
* ]
|
|
17
|
-
* })
|
|
18
|
-
*
|
|
19
|
-
* const ma = multiaddr('/ip4/123.123.123.123/tcp/1234')
|
|
20
|
-
*
|
|
21
|
-
* // dial a TCP connection, timing out after 10 seconds
|
|
22
|
-
* const connection = await node.dial(ma, {
|
|
23
|
-
* signal: AbortSignal.timeout(10_000)
|
|
24
|
-
* })
|
|
25
|
-
*
|
|
26
|
-
* // use connection...
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
1
|
import { serviceCapabilities, transportSymbol } from '@libp2p/interface';
|
|
30
2
|
import type { TCPDialEvents } from './index.js';
|
|
31
3
|
import type { Connection, Transport, Listener } from '@libp2p/interface';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tcp.browser.d.ts","sourceRoot":"","sources":["../../src/tcp.browser.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"tcp.browser.d.ts","sourceRoot":"","sources":["../../src/tcp.browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACxE,OAAO,KAAK,EAAiB,aAAa,EAA0B,MAAM,YAAY,CAAA;AACtF,OAAO,KAAK,EAAU,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAChF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAExD,qBAAa,GAAI,YAAW,SAAS,CAAC,aAAa,CAAC;IAClD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAY;IACjC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAY;IACrC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAe;IAC1C,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAQ;;IAM5B,QAAQ,CAAC,CAAC,eAAe,CAAC,QAAO;IAEjC,QAAQ,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,iBAAgB;IAE7C,QAAQ,CAAC,CAAC,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAEvC;IAEK,IAAI,IAAK,OAAO,CAAC,UAAU,CAAC;IAIlC,cAAc,IAAK,QAAQ;IAI3B,YAAY,IAAK,SAAS,EAAE;IAI5B,UAAU,IAAK,SAAS,EAAE;CAG3B"}
|
package/dist/src/tcp.browser.js
CHANGED
|
@@ -1,31 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @packageDocumentation
|
|
3
|
-
*
|
|
4
|
-
* A [libp2p transport](https://docs.libp2p.io/concepts/transports/overview/) based on the TCP networking stack.
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
*
|
|
8
|
-
* ```TypeScript
|
|
9
|
-
* import { createLibp2p } from 'libp2p'
|
|
10
|
-
* import { tcp } from '@libp2p/tcp'
|
|
11
|
-
* import { multiaddr } from '@multiformats/multiaddr'
|
|
12
|
-
*
|
|
13
|
-
* const node = await createLibp2p({
|
|
14
|
-
* transports: [
|
|
15
|
-
* tcp()
|
|
16
|
-
* ]
|
|
17
|
-
* })
|
|
18
|
-
*
|
|
19
|
-
* const ma = multiaddr('/ip4/123.123.123.123/tcp/1234')
|
|
20
|
-
*
|
|
21
|
-
* // dial a TCP connection, timing out after 10 seconds
|
|
22
|
-
* const connection = await node.dial(ma, {
|
|
23
|
-
* signal: AbortSignal.timeout(10_000)
|
|
24
|
-
* })
|
|
25
|
-
*
|
|
26
|
-
* // use connection...
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
1
|
import { serviceCapabilities, transportSymbol } from '@libp2p/interface';
|
|
30
2
|
export class TCP {
|
|
31
3
|
opts;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tcp.browser.js","sourceRoot":"","sources":["../../src/tcp.browser.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"tcp.browser.js","sourceRoot":"","sources":["../../src/tcp.browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAKxE,MAAM,OAAO,GAAG;IACG,IAAI,CAAY;IAChB,OAAO,CAAa;IACpB,UAAU,CAAe;IACzB,GAAG,CAAQ;IAE5B;QACE,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAA;IACjE,CAAC;IAEQ,CAAC,eAAe,CAAC,GAAG,IAAI,CAAA;IAExB,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,aAAa,CAAA;IAEpC,CAAC,mBAAmB,CAAC,GAAa;QACzC,mBAAmB;KACpB,CAAA;IAED,KAAK,CAAC,IAAI;QACR,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAA;IACjE,CAAC;IAED,cAAc;QACZ,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAA;IACjE,CAAC;IAED,YAAY;QACV,OAAO,EAAE,CAAA;IACX,CAAC;IAED,UAAU;QACR,OAAO,EAAE,CAAA;IACX,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libp2p/tcp",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.11-32ca76fcb",
|
|
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",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"test:electron-main": "aegir test -t electron-main"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@libp2p/interface": "
|
|
64
|
-
"@libp2p/utils": "
|
|
63
|
+
"@libp2p/interface": "2.2.0-32ca76fcb",
|
|
64
|
+
"@libp2p/utils": "6.1.3-32ca76fcb",
|
|
65
65
|
"@multiformats/mafmt": "^12.1.6",
|
|
66
66
|
"@multiformats/multiaddr": "^12.2.3",
|
|
67
67
|
"@types/sinon": "^17.0.3",
|
|
@@ -72,13 +72,10 @@
|
|
|
72
72
|
"stream-to-it": "^1.0.1"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
|
-
"@libp2p/
|
|
76
|
-
"@libp2p/logger": "^5.1.2",
|
|
75
|
+
"@libp2p/logger": "5.1.3-32ca76fcb",
|
|
77
76
|
"aegir": "^44.0.1",
|
|
78
|
-
"it-all": "^3.0.6",
|
|
79
|
-
"it-pipe": "^3.0.1",
|
|
80
77
|
"sinon": "^18.0.0",
|
|
81
|
-
"
|
|
78
|
+
"sinon-ts": "^2.0.0",
|
|
82
79
|
"wherearewe": "^2.0.1"
|
|
83
80
|
},
|
|
84
81
|
"browser": {
|
package/src/tcp.browser.ts
CHANGED
|
@@ -1,32 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @packageDocumentation
|
|
3
|
-
*
|
|
4
|
-
* A [libp2p transport](https://docs.libp2p.io/concepts/transports/overview/) based on the TCP networking stack.
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
*
|
|
8
|
-
* ```TypeScript
|
|
9
|
-
* import { createLibp2p } from 'libp2p'
|
|
10
|
-
* import { tcp } from '@libp2p/tcp'
|
|
11
|
-
* import { multiaddr } from '@multiformats/multiaddr'
|
|
12
|
-
*
|
|
13
|
-
* const node = await createLibp2p({
|
|
14
|
-
* transports: [
|
|
15
|
-
* tcp()
|
|
16
|
-
* ]
|
|
17
|
-
* })
|
|
18
|
-
*
|
|
19
|
-
* const ma = multiaddr('/ip4/123.123.123.123/tcp/1234')
|
|
20
|
-
*
|
|
21
|
-
* // dial a TCP connection, timing out after 10 seconds
|
|
22
|
-
* const connection = await node.dial(ma, {
|
|
23
|
-
* signal: AbortSignal.timeout(10_000)
|
|
24
|
-
* })
|
|
25
|
-
*
|
|
26
|
-
* // use connection...
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
|
-
|
|
30
1
|
import { serviceCapabilities, transportSymbol } from '@libp2p/interface'
|
|
31
2
|
import type { TCPComponents, TCPDialEvents, TCPMetrics, TCPOptions } from './index.js'
|
|
32
3
|
import type { Logger, Connection, Transport, Listener } from '@libp2p/interface'
|
package/dist/typedoc-urls.json
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"CloseServerOnMaxConnectionsOpts": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_tcp.CloseServerOnMaxConnectionsOpts.html",
|
|
3
|
-
"TCPComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_tcp.TCPComponents.html",
|
|
4
|
-
".:TCPComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_tcp.TCPComponents.html",
|
|
5
|
-
"TCPCreateListenerOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_tcp.TCPCreateListenerOptions.html",
|
|
6
|
-
".:TCPCreateListenerOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_tcp.TCPCreateListenerOptions.html",
|
|
7
|
-
"TCPDialOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_tcp.TCPDialOptions.html",
|
|
8
|
-
".:TCPDialOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_tcp.TCPDialOptions.html",
|
|
9
|
-
"TCPMetrics": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_tcp.TCPMetrics.html",
|
|
10
|
-
".:TCPMetrics": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_tcp.TCPMetrics.html",
|
|
11
|
-
"TCPOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_tcp.TCPOptions.html",
|
|
12
|
-
".:TCPOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_tcp.TCPOptions.html",
|
|
13
|
-
"TCPSocketOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_tcp.TCPSocketOptions.html",
|
|
14
|
-
".:TCPSocketOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_tcp.TCPSocketOptions.html",
|
|
15
|
-
"TCPDialEvents": "https://libp2p.github.io/js-libp2p/types/_libp2p_tcp.TCPDialEvents.html",
|
|
16
|
-
".:TCPDialEvents": "https://libp2p.github.io/js-libp2p/types/_libp2p_tcp.TCPDialEvents.html",
|
|
17
|
-
"tcp": "https://libp2p.github.io/js-libp2p/functions/_libp2p_tcp.tcp.html",
|
|
18
|
-
".:tcp": "https://libp2p.github.io/js-libp2p/functions/_libp2p_tcp.tcp.html"
|
|
19
|
-
}
|