|
5 | 5 | [](https://codecov.io/gh/libp2p/js-libp2p-tcp) |
6 | 6 | [](https://github.com/libp2p/js-libp2p-tcp/actions/workflows/js-test-and-release.yml) |
7 | 7 |
|
8 | | -> Node.js implementation of the TCP module that libp2p uses, which implements the interface-connection and interface-transport interfaces |
| 8 | +> A TCP transport for libp2p |
9 | 9 |
|
10 | 10 | ## Table of contents <!-- omit in toc --> |
11 | 11 |
|
12 | 12 | - [Install](#install) |
13 | 13 | - [Usage](#usage) |
14 | | -- [API](#api) |
15 | | - - [Transport](#transport) |
16 | | - - [Connection](#connection) |
17 | | -- [Contribute](#contribute) |
18 | | -- [Contribute](#contribute-1) |
| 14 | +- [API Docs](#api-docs) |
19 | 15 | - [License](#license) |
20 | | -- [Contribute](#contribute-2) |
| 16 | +- [Contribute](#contribute) |
21 | 17 |
|
22 | 18 | ## Install |
23 | 19 |
|
24 | 20 | ```console |
25 | 21 | $ npm i @libp2p/tcp |
26 | 22 | ``` |
27 | 23 |
|
28 | | -[](https://github.com/libp2p/js-libp2p-interfaces/tree/master/src/transport) |
29 | | -[](https://github.com/libp2p/js-libp2p-interfaces/tree/master/src/connection) |
30 | | - |
31 | | -```sh |
32 | | -> npm install @libp2p/tcp |
33 | | -``` |
34 | | - |
35 | 24 | ## Usage |
36 | 25 |
|
37 | 26 | ```js |
@@ -82,41 +71,9 @@ new connection opened |
82 | 71 | Value: hello World! |
83 | 72 | ``` |
84 | 73 |
|
85 | | -## API |
86 | | - |
87 | | -### Transport |
88 | | - |
89 | | -[](https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/libp2p-interfaces/src/transport) |
90 | | - |
91 | | -`@libp2p/tcp` accepts TCP addresses as both IPFS and non IPFS encapsulated addresses, i.e: |
92 | | - |
93 | | -`/ip4/127.0.0.1/tcp/4001` |
94 | | -`/ip4/127.0.0.1/tcp/4001/ipfs/QmHash` |
95 | | - |
96 | | -(both for dialing and listening) |
97 | | - |
98 | | -### Connection |
99 | | - |
100 | | -[](https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/libp2p-interfaces/src/connection) |
101 | | - |
102 | | -## Contribute |
103 | | - |
104 | | -Contributions are welcome! The libp2p implementation in JavaScript is a work in progress. As such, there's a few things you can do right now to help out: |
105 | | - |
106 | | -- [Check out the existing issues](//github.com/libp2p/js-libp2p-tcp/issues). |
107 | | -- **Perform code reviews**. |
108 | | -- **Add tests**. There can never be enough tests. |
109 | | - |
110 | | -Please be aware that all interactions related to libp2p are subject to the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). |
111 | | - |
112 | | -Small note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification. |
113 | | - |
114 | | -## Contribute |
115 | | - |
116 | | -The libp2p implementation in JavaScript is a work in progress. As such, there are a few things you can do right now to help out: |
| 74 | +## API Docs |
117 | 75 |
|
118 | | -- Go through the modules and **check out existing issues**. This is especially useful for modules in active development. Some knowledge of IPFS/libp2p may be required, as well as the infrastructure behind it - for instance, you may need to read up on p2p and more complex operations like muxing to be able to help technically. |
119 | | -- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs. |
| 76 | +- <https://libp2p.github.io/js-libp2p-tcp> |
120 | 77 |
|
121 | 78 | ## License |
122 | 79 |
|
|
0 commit comments