Commit Graph

14 Commits

Author SHA1 Message Date
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
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
Steven Allen
6b6687f9e4 reset on error in echo 2017-09-13 15:56:55 -07:00
Jeromy
5132c763e3 update example to make it easy to swap out stream muxer 2017-05-13 23:50:46 -07: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
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
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