2425 Commits

Author SHA1 Message Date
Toralf Wittner
66db7f89b7 Externalise unsigned-varint crate. (#329) 2018-08-10 16:35:41 +02:00
Pierre Krieger
eb53ea2515
Add CircleCI build for win32 (#398)
* Add CircleCI build for win32

* Use cargo check instead

* Build for 32bits as well
2018-08-09 15:12:13 +02:00
Pierre Krieger
078fa1cb33
Rework the multihash crate (#403)
* Use Multihash and MultihashRef instead

* Don't use star imports

* Split EncodeError and DecodeError

* Add DecodeOwnedError

* Some cleanup

* Remove Hash::name()

* Some crate root documentation

* Add some more methods

* Fix tests

* Add PartialEq between Multihash and MultihashRef

* Fix the rest of the repo

* Rename hash_data() to digest()

* Add comment about varint

* Remove Error::description impls
2018-08-09 14:51:09 +02:00
Pierre Krieger
486a9694d9
Tcp refinements (#404)
* Improve nat_traversal

* Remove the Box for dialing

* Improve multiaddr_to_socketaddr

* Use ? on None

* Use a proper stream for TcpListenStream

* Rustfmt

* Use tk_listen for errors on the listener

* Minor changes

* Fix concerns
2018-08-09 14:04:15 +02:00
Pierre Krieger
5546bb9dfd
Use tk_listen to absorb errors on the TcpListener (#402)
* Use tk_listen to absorb errors on the TcpListener

* Put sleep_on_error in TcpConfig
2018-08-08 17:54:15 +02:00
Pierre Krieger
c3655226bb Add a UNIX transport (#308)
* Use the new version of tokio
* Add a UNIX transport
2018-08-08 12:38:29 +02:00
Pierre Krieger
ea881e3dfa Rework swarm and allow interrupting a dial (#366)
* Rework swarm and allow interrupting a dial
* Improve the UniqueConnec situation
* Remove UniqueConnec::get
* Rename `get_or_dial()` to `dial()` and add `dial_if_empty()`
* Clean the UniqueConnec is the future is dropped
* Rename `set_until` to `tie_or_stop` and add `tie_or_passthrough`
* Add some tests, docs
* Fix memory leak with tasks registration
* Interrupt dialing when a UniqueConnec is dropped or cleared
2018-08-08 12:00:38 +02:00
Pierre Krieger
e2618dc1b3
Add some From impls for AddrComponent (#395) 2018-08-07 19:57:57 +02:00
Qian LinFeng
d8d6a49dfe Fix decode data UnexpectedEof bug (#384) 2018-08-07 19:36:40 +02:00
Pierre Krieger
0348ac3534 Make ping unidirectional (#381) 2018-08-06 17:16:27 +02:00
Benjamin Kampmann
b573daa06d
Strongly type AddrComponent::{P2P, IPFS} with Cids (#357)
* Strongly type CID in AddrComponent::{IPFS, P2P}

* Reexport Cid, ToCid for convenience

* Fix Cid-typed P2P AddrComponents in dependencies
2018-08-06 17:04:49 +02:00
Pierre Krieger
1110907d78 Rewrite multiplex tests to use the memory transport (#370) 2018-08-06 10:41:11 +02:00
Pierre Krieger
9009a6ffa7 Fix peers() always returning empty results (#373) 2018-08-06 10:17:27 +02:00
Pierre Krieger
e14a5af8dd Update the P2P multiaddr component to 421 (#383) 2018-08-06 10:07:22 +02:00
Pierre Krieger
7d9836de7b Remove travis.yml (#382) 2018-08-06 09:54:37 +02:00
Pierre Krieger
c677980f91 Add Transport::map_err (#317)
* Add Transport::map_err
2018-07-31 10:43:41 +02:00
Pierre Krieger
ffe63ff987 Unify the versions of parking_lot (#380) 2018-07-30 16:06:03 +02:00
James Ray
9b233ba3ea Fix repeatedly spelling, more and more, add a clarification (#376)
Correct me if saying "close connections to non-responsive remotes (which would then de-allocate memory for the ping)" is wrong.
2018-07-27 10:46:45 +02:00
James Ray
3d6b1dbc3e Put comments in code and ie. -> i.e. (#375) 2018-07-27 10:10:14 +02:00
Toralf Wittner
81e8735968 Add memory transport. (#343)
* Add memory transport.

* Change test to be compatible with rust stable.

* Address concerns

* Add some documentation and minor fixes

* Move transport test to memory module
2018-07-25 13:44:27 +02:00
Pierre Krieger
e0d057a1a6
Add some logging when disconnecting a TCP stream (#352)
* Add some logging when disconnecting a TCP stream

* More logging
2018-07-21 13:01:59 +02:00
Pierre Krieger
9480295bf2
Add licenses to all Cargo.toml files (#349) 2018-07-21 12:15:42 +02:00
Toralf Wittner
9d28fa0b78 Skip over buckets older than ping_timeout. (#340)
Addresses issue #321.
2018-07-21 11:15:29 +02:00
Pierre Krieger
4db425d132
Fix potential panic in ping (#342) 2018-07-20 09:49:17 +02:00
Pierre Krieger
6acc0c7c5f
Add UniqueConnec::is_alive (#339) 2018-07-19 14:00:13 +02:00
Pierre Krieger
0cfaa23908
Add upgrade::map_with_addr (#331)
* Add upgrade::map_with_addr

* Some help for inferrence
2018-07-19 10:55:04 +02:00
Pierre Krieger
7507e0bfd9
Make the Pinger clonable (#330) 2018-07-18 18:47:58 +02:00
Toralf Wittner
bd169a5a4b Do not return peers with only expired addresses. (#325) 2018-07-18 14:37:01 +02:00
Toralf Wittner
cbc845d345 Always store open frames to internal buffer. (#319) 2018-07-18 12:35:37 +02:00
Toralf Wittner
b423e9fe8c
Use tokio-codec in mplex. (#315) 2018-07-18 10:30:56 +02:00
Pierre Krieger
8e07c18178
Fix panic in identify (#314) 2018-07-17 23:26:50 +02:00
Pierre Krieger
294310cd07
Rewrite multiplex (#261)
* Rewrite multiplex

* Increase the packet size limit to 32 MB

* Fix waiting for poll_complete to finish

* Typo

* Properly close substreams

* Add a limit to the number of substreams

* Add a limit to the length of the internal buffer

* Fix concerns
2018-07-17 16:31:32 +02:00
Pierre Krieger
053197bd1c
Rework the Kademlia high-level system (#282)
* Kademlia high-level rework

* Some changes in the rework

* Some additional tweaks to kad rework

* Add update_kbuckets

* Rename a bunch of Kademlia stuff

* Add KadSystem::local_peer_id

* Some documentation update

* Concern

* Make the example compile

* Make things nicer

* Fix bug in UniqueConnec

* Add clear() to UniqueConnec

* Add UniqueConnec::poll

* Fix potential deadlock in UniqueConnec

* Add UniqueConnec::state()

* The future of get now contains a Weak

* Fix concerns
2018-07-17 15:51:11 +02:00
Pierre Krieger
6bda589389
Some cleanup with clippy and rustfmt (#310) 2018-07-17 11:55:18 +02:00
Pierre Krieger
bd965d1668
Test creating lots of connections amongst lots of swarm (#304)
* Use the new version of tokio

* Add tests for lots of connections in a swarm

* Remove wrongly-added file
2018-07-16 16:56:05 +02:00
Pierre Krieger
80f0f9986a
Add yamux in the reexports (#305) 2018-07-16 12:45:28 +02:00
Pierre Krieger
16e3453b7f
Use the new version of tokio (#303) 2018-07-16 12:15:27 +02:00
Pierre Krieger
e74e3f4950
Remove the AsyncRead/Write bounds in ConnectionUpgrade (#302) 2018-07-14 14:12:19 +02:00
Pierre Krieger
7c71ffddb2
Remove exposed unimplemented!() in the Kad server (#298) 2018-07-14 13:58:16 +02:00
Pierre Krieger
4592d1b21e
SwarmController::dial now returns a Future (#290)
* SwarmController::dial now returns a Future

* Minor comment
2018-07-14 13:46:11 +02:00
Pierre Krieger
c05e7e0c4e
Two minor swarm tests (#300) 2018-07-14 13:31:22 +02:00
Pierre Krieger
5639b04fc5
Fix travis (#301) 2018-07-14 09:10:35 +02:00
Pierre Krieger
857c6653ec
Always identify the remote (#277) 2018-07-11 14:35:24 +02:00
Pierre Krieger
b3ed7f852a
Fix the authors in multiple Cargo.toml (#293) 2018-07-11 13:06:42 +02:00
Pierre Krieger
f104dd9036
Run rustfmt on files that aren't really touched (#289) 2018-07-11 11:14:40 +02:00
James Ray
e11fac938e Fix Thisis (#292) 2018-07-11 10:56:48 +02:00
Toralf Wittner
d5602e7687 Add support for yamux multiplexing. (#284)
* Add support for yamux multiplexing.

* Address review comments.
2018-07-10 14:59:24 +02:00
Qian LinFeng
fd01b18e53 Upgrade and unify protobuf version(1.x => 2.0.2) (#283)
* Update and unify protobuf version(1.x => 2.0.2)

* Update protobuf codegen shell script
2018-07-10 14:07:28 +02:00
Pierre Krieger
18075f4eaa
Give access to secio ephemeral key (#280)
* Give access to secio ephemeral key

* Fix tests
2018-07-04 17:07:38 +02:00
Pierre Krieger
03947908b4
Add upgrade::toggleable (#281)
* Add upgrade::toggleable

* Some minor fixes/improvements
2018-07-03 16:10:15 +02:00