Commit b1e09dbf authored by Aviv Eyal's avatar Aviv Eyal Committed by Steven Allen
Browse files

Update readmes

parent ce95b37c
......@@ -11,3 +11,4 @@ Let us know if you find any issue or if you want to contribute and add a new tut
- [Building an http proxy with libp2p](./http-proxy)
- [Protocol Multiplexing with multicodecs](./protocol-multiplexing-with-multicodecs)
- [An echo host](./echo)
- [Multicodecs with protobufs](./multipro)
\ No newline at end of file
# This is the official list of authors for copyright purposes.
Aviv Eyal <aviveyal07@gmail.com>
\ No newline at end of file
Aviv Eyal <aviveyal07@gmail.com>
......@@ -6,23 +6,33 @@ This example expects that you area already familiar with the [echo example](http
## Build
Compile the .proto files using the protobufs go compiler:
Install gx:
```sh
> go get -u github.com/whyrusleeping/gx
```
protoc --go_out=. ./p2p.proto
Run GX from the root libp2p source dir:
```sh
>gx install
```
Build libp2p:
```sh
> make deps
> make
```
From `multipro` base source folder:
Run from `multipro` directory
```
```sh
> go build
```
## Usage
```
```sh
> ./multipro
```
......@@ -31,7 +41,7 @@ From `multipro` base source folder:
The example creates two LibP2P Hosts supporting 2 protocols: ping and echo.
Each protocol consists RPC-style requests and respones and each request and response is a typed protobufs message (and a go data object).
Each protocol consists RPC-style requests and responses and each request and response is a typed protobufs message (and a go data object).
This is a different pattern then defining a whole p2p protocol as one protobuf message with lots of optional fields (as can be observed in various p2p-lib protocols using protobufs such as dht).
......
# Protocol Multiplexing using multicodecs with libp2p
This examples shows how to use multicodecs (i.e. json) to encode and transmit information between LibP2P hosts using LibP2P Streams.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment