Christophe de Carvalho Pereira Martins
f842b5569d
update README of the host example
...
fixes #333
2018-06-06 14:37:30 +02:00
Steven Allen
41c6834850
refactor for transport changes
...
Also, make the libp2p constructor fully useful. There should now be no need to
manually construct a swarm/host.
2018-06-04 21:22:24 -07:00
Steven Allen
5180df872e
Merge pull request #284 from upperwal/master
...
Added example "chat" with README
2018-03-03 22:58:01 +00:00
Abhishek Upperwal
d91fc25491
Added example "chat" with README
2018-03-03 14:05:51 +05:30
Steven Allen
b7c2a0a9b9
make go vet happy
2018-03-02 15:01:17 -08:00
Steven Allen
7ba479f30e
use pb for protobufs, not p2p
...
For some reason, this was causing gx to freak out.
2018-03-02 15:00:51 -08:00
Aviv Eyal
1be077d5b8
Add proto build instructions
2018-02-22 11:07:20 -08:00
Aviv Eyal
b1e09dbf19
Update readmes
2018-02-22 11:07:15 -08:00
Aviv Eyal
062100be4f
Formatting
2018-02-22 10:54:35 -08:00
Steven Allen
88d649c7c7
remove multipro example dependency on go-ipfs
2018-02-21 15:51:48 -08:00
Steven Allen
9bb072f8f7
fix copyright multipro example license
2018-02-21 15:50:27 -08:00
Steven Allen
6b1133d8e7
switch probuf to gogo
...
(otherwise, the gx imports won't work)
2018-02-21 15:26:00 -08:00
Steven Allen
6e3c94f943
switch multipro example to a different UUID package
...
We already have this one imported into GX. Saves the effort of importing a
different one.
2018-02-21 15:07:55 -08:00
Steven Allen
6297f79d77
fix example import
...
(need to use the canonical repository location for everything to work)
2018-02-21 15:01:21 -08:00
Steven Allen
64a0735718
gx-go unrewrite
2018-02-21 15:01:21 -08:00
Aviv Eyal
05928a9417
Make sendProtoMessage a method
2018-02-21 15:01:21 -08:00
Aviv Eyal
3eb465bffe
Remove protocol.go
2018-02-21 15:01:21 -08:00
Aviv Eyal
a13480f00a
Added comments and updated readme
2018-02-21 15:01:21 -08:00
Aviv Eyal
2dbb78f88f
Added authors
2018-02-21 15:01:21 -08:00
Aviv Eyal
9f7564448d
Refactoring
2018-02-21 15:01:21 -08:00
Aviv Eyal
7702e9b8be
Minor code cleanup
2018-02-21 15:01:21 -08:00
Aviv Eyal
49182bcfeb
Don't rely on local peer store for remote nodes public keys
2018-02-21 15:01:21 -08:00
Aviv Eyal
efdab23082
Use pointers for methods to avoid copying
2018-02-21 15:01:21 -08:00
Aviv Eyal
8d6313d195
Go frmt proj
2018-02-21 15:01:21 -08:00
Aviv Eyal
4b231df997
log.Fatal() -> log.Println()
2018-02-21 15:01:21 -08:00
Aviv Eyal
bf7f80c30a
Refactoring
2018-02-21 15:01:21 -08:00
Aviv Eyal
45c3b5d4a3
Authenticate echo protocol messages
2018-02-21 15:01:21 -08:00
Aviv Eyal
0b1ed3936a
Authenticate ping protocol messages
2018-02-21 15:01:21 -08:00
Aviv Eyal
b3d54ab284
Sign all messages
2018-02-21 15:01:21 -08:00
Aviv Eyal
0874c5036e
Refactoring
2018-02-21 15:01:21 -08:00
Aviv Eyal
f1dd3185b4
Formatting
2018-02-21 15:01:21 -08:00
Aviv Eyal
c6bfb4d945
Update node type
2018-02-21 15:01:21 -08:00
Aviv Eyal
f0b185695a
fixed typos
2018-02-21 15:01:21 -08:00
Aviv Eyal
3f926c52eb
Apply go formatting
2018-02-21 15:01:21 -08:00
Aviv Eyal
54aa54a59a
Updated comments
2018-02-21 15:01:21 -08:00
Aviv Eyal
01e1a19c3f
updated readme and comments
2018-02-21 15:01:21 -08:00
Aviv Eyal
380ae70ddc
Added multi-protocol using protobufs example
2018-02-21 15:01:21 -08:00
Chris Dostert
f50cbd5d8a
add link to example implementation
2018-01-27 06:56:01 -08:00
Jeromy
bbbc040b60
incorporate lgierths opinions
2018-01-07 12:22:05 -08:00
Jeromy
8d84ecd01b
functional parameters
2018-01-07 12:22:05 -08:00
Jeromy
d04268054f
use new constructor for examples
2018-01-07 12:22:05 -08:00
Errol Chevannes
835b66ab73
Fixed typo.
2017-12-29 15:14:46 +00:00
Steven Allen
6b6687f9e4
reset on error in echo
2017-09-13 15:56:55 -07:00
Steven Allen
d2dd60a285
reset on error in proxy example.
2017-09-13 15:51:05 -07:00
ssikdar1
7f03ab4b6f
Fixing build insctuction so copy and pasting from Readme works
...
As is go build ./examples/protocol-multiplexing-with-multicodecs
will make the binary name protocol-multiplexing-with-multicodecs
so the next command ./multicodecs won't run
using -o will name the outputfile
2017-09-08 10:22:08 -04:00
verysimplyms
7990195e5f
docs: fix typo in README
2017-09-06 09:56:48 +01:00
Steven Allen
00cf69eb49
examples/echo: recommend -secio
...
When not using -secio, this command prints a warning. This confuses users so we
should just tell users to use it in the instructions.
fixes #179
2017-08-30 17:45:45 -07:00
David Dias
2c7c62ee3a
docs(examples): give a pass through remaining examples
2017-08-19 18:18:07 +02:00
David Dias
a8926ed732
docs(examples): small refresh to the echo example
2017-08-19 18:12:11 +02:00
David Dias
564e2ba314
docs(examples): reorganize examples and tutorials, add an index
2017-08-19 17:57:51 +02:00
Jeromy
5132c763e3
update example to make it easy to swap out stream muxer
2017-05-13 23:50:46 -07:00
Eric Tang
5b297b7160
typo
2017-04-26 13:17:21 -04:00
Hector Sanjuan
93802a4007
Add http proxy example
...
The example proxies http requests through a libp2p stream.
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-03-30 11:14:19 +02:00
Hector Sanjuan
9706590149
Add example on how to use multicodecs to encode/decode data on a stream
...
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-03-22 18:12:18 +01:00
Hector Sanjuan
7e11c6008b
Docs: Improve echo example
...
* Do not use testutil to generate random keys and ids since this is a testing
dependency. Use crypto.GenerateKeyPair() instead.
* Echo full lines
* Improve output by telling the user what to run
* More code comments
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-03-22 18:12:18 +01:00
Jeromy Johnson
51ad894515
Merge pull request #181 from zippy/master
...
more imports cleanup, another dup.
2017-03-08 18:31:49 -08:00
Jeromy
ff5be0e63b
seed rand for generation of peer IDs in echo example
2017-03-06 23:23:48 -08:00
Eric Harris-Braun
0f0a36c62c
more imports cleanup, another dup.
2017-02-22 08:37:38 -05:00
Eric Harris-Braun
db919af600
imports cleanup, remove dup
2017-02-21 13:45:42 -05:00
Justin
a92558f752
More fixes
2016-11-24 20:54:47 +00:00
Justin
6ac1064a93
Fix port number of echo example
2016-11-24 16:43:52 +00:00
Justin
6e35a38789
More example fixes
2016-11-24 16:35:53 +00:00
Justin
b7fdb1f20b
Fix path
2016-11-24 16:24:21 +00:00
Hector Sanjuan
7c5d076dc6
Improve echo example:
...
* Extended explanations and links to relevant godocs
* Some renames (the host is not dummy, it's a basic)
* Use addAddr() and let NewStream open the connection
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2016-11-10 12:30:00 +01:00
Lars Gierth
f3812decb8
Rename hosts to echo example, remove justtcp example
2016-11-06 04:51:45 +01:00
Lars Gierth
4150c40ebf
Fix hosts example
2016-11-06 04:42:59 +01:00
Jeromy
7aced371c7
extract libp2p-swarm
2016-10-05 10:34:57 -07:00
Jeromy
70872ff663
update deps
2016-10-04 21:18:07 -07:00
Jeromy
1a53ad77b9
extract host interface
2016-10-04 16:16:24 -07:00
Jeromy
cea1fe131f
extract net interface and metrics
2016-10-04 13:56:20 -07:00
Jeromy
0f3ffb2d07
extract conn, addr-util, and testutil
2016-10-04 13:03:14 -07:00
Jeromy
4dd30d824b
switch to using stdlib context package
2016-10-03 11:00:00 -07:00
Jeromy
2eef5a702e
split tcp transports out of the base package
2016-09-25 04:51:27 -07:00
Jeromy
ab39c6f524
don't use ipfsaddr
2016-09-04 10:45:31 -07:00
Jeromy
f9cd03e625
allow hosts example to use secio
2016-09-04 10:37:32 -07:00
Jeromy
a56440a9c7
swarm: pass in stream muxer on construct
2016-09-04 08:13:36 -07:00
Jeromy
713d9a8798
examples: example using swarm and raw tcp (no muxing)
2016-09-03 10:43:31 -07:00
Jeromy
7a3394b1da
host: remember which protocols work for a given peer
2016-08-18 11:16:00 -07:00
Jeromy
8744e460da
update local import paths to reflect org change
2016-08-10 09:59:14 -07:00
Jeromy
c0e2b930e3
update multistream deps and fix code to work with new changes
2016-08-10 09:48:34 -07:00
Jeromy
5100dcec6e
update hosts example
2016-06-14 09:07:35 -07:00
Jeromy
dbbd9bb1e9
add hosts example
2016-06-12 14:01:54 -07:00