Pierre Krieger
dbff125df2
Add an Error associated type to transports ( #835 )
...
* Add an Error associated type to transports
* Improve raw swarm a bit
* Rename map_other to map
* Use source() instead of cause()
* RawSwarmIncErr -> IncomingError
2019-01-10 11:27:06 +01:00
Toralf Wittner
f1959252b7
multistream-select: Less allocations. ( #800 )
2019-01-09 15:09:35 +01:00
Pierre Krieger
2eb7fe7c64
Switch libp2p-core to edition 2018 ( #819 )
2019-01-07 11:21:09 +01:00
Pierre Krieger
83320e0347
More precise error passed to inject_dial_upgrade_error ( #771 )
...
* More precise error passed to inject_dial_upgrade_error
* Fix concerns
* Fix panic proof
2018-12-18 11:23:13 +01:00
Toralf Wittner
a152e18821
Simplify handling of upgrade information. ( #761 )
2018-12-11 15:13:10 +01:00
Toralf Wittner
dd5fb17a2b
Rename OrUpgrade
to SelectUpgrade
. ( #751 )
...
Also remove `InboundUpgrade.or_inbound` and `OutboundUpgrade.or_outbound`.
2018-12-07 11:39:18 +01:00
Toralf Wittner
d130302e15
Remove several unused transports. ( #673 )
2018-11-26 13:46:34 +01:00
Pierre Krieger
1da97242da
Remove the NamesIter: Clone requirement ( #663 )
...
* Remove the NamesIter: Clone requirement
* Fix concerns
2018-11-22 18:15:35 +01:00
Toralf Wittner
938b91742f
Add EitherUpgrade
and generalise OrUpgrade
. ( #662 )
2018-11-20 15:09:59 +01:00
Toralf Wittner
64af676178
Fix mapping of upgrade errors. ( #656 )
...
The current implementation of `MapUpgradeErr` implements `InboundUpgrade`
and `OutboundUpgrade` and applies the transformation in both cases which
means that mapping is always applied to inbound and outbound upgrade
errors. This commit uses separate `MapInboundUpgradeErr` and
`MapOutboundUpgradeErr` types which implements both traits but only map
errors in one direction.
2018-11-19 16:08:00 +01:00
Toralf Wittner
e7bffd009f
Add upgrade::apply
for convenience. ( #653 )
2018-11-19 15:19:07 +01:00
Toralf Wittner
1d1970c772
Fix mapping of upgrade. ( #654 )
...
The current implementation of `MapUpgrade` implements `InboundUpgrade`
and `OutboundUpgrade` and applies the transformation in both cases which
means that mapping is always applied to inbound and outbound upgrades.
This commit uses separate `MapInboundUpgrade` and `MapOutboundUpgrade`
types which implements both traits but only map in one direction.
2018-11-19 10:58:45 +01:00
Pierre Krieger
146817d7d9
Document the core::upgrade module ( #644 )
...
* Document the upgrade module
* Apply suggestions from code review
Co-Authored-By: tomaka <pierre.krieger1708@gmail.com>
* More fixes
2018-11-16 12:11:44 +01:00
Toralf Wittner
2e549884ef
Split ConnectionUpgrade
. ( #642 )
...
Introduce `InboundUpgrade` and `OutboundUpgrade`.
2018-11-15 17:41:11 +01:00
Pierre Krieger
623728b35d
Add a custom derive for NetworkBehaviour ( #619 )
...
* Add ProtocolsHandlerSelect
* Add a custom derive for NetworkBehaviour
* Remove 2018 edition
* More work
* Update the tests and work
* Allow ignored fields
* More fixes
* Give access to everything in the poll method
2018-11-12 17:12:47 +01:00
James Ray
0f3ef5ee0a
eg. -> e.g.; ie. -> i.e. via repren ( #592 )
...
* eg. -> e.g.; ie. -> i.e. via repren
* se.g. -> seg.
2018-11-02 16:40:00 +01:00
Toralf Wittner
585c90a33c
Add protocol to report external address view. ( #566 )
...
Add protocol to report external address view.
Address part of #443 .
2018-10-28 11:02:26 +01:00
Pierre Krieger
4a894851ab
Remove even more unused files ( #581 )
...
* Remove even more unused files
* Remove dummy.rs as well
2018-10-23 12:07:06 +02:00
Pierre Krieger
5d1c54cc10
New core ( #568 )
...
* New core
* Fix lifetime requirements
* Remove identify transport
* Address &mut & ref ref mut
* Fix whitespaces
2018-10-17 10:17:40 +01:00
Toralf Wittner
5c35047ee3
Change stream ID handling to consider flags. ( #436 )
...
Replaces the former odd/even distinction of IDs. However we still increment stream IDs by 2
for backwards compatibility.
2018-09-06 13:59:14 +02:00
Pierre Krieger
ea1f172397
Implement Send everywhere ( #458 )
2018-09-06 09:54:35 +02:00
Guanqun Lu
ee9be6f0c9
add must_use for Future ( #450 )
2018-09-04 12:30:57 +02:00
Toralf Wittner
c02dea8128
Introduce several concrete future types. ( #433 )
...
* multisteam-select: introduce `DialerFuture`.
* multistream-select: add more concrete futures.
* multistream-select: add ListenerFuture.
* multistream-select: add ListenerSelectFuture
* Formatting.
* Add DialerSelectFuture type alias.
* Add UpgradeApplyFuture and NegotiationFuture.
* In iterator wrappers also pass-through size_hint.
* Minor refactoring.
* Address review comments.
* Add some comments.
* Hide state enums in wrapping structs.
2018-08-30 23:25:16 +02:00
Pierre Krieger
bd73f60358
Add some Send implementations to Futures ( #412 )
2018-08-14 15:23:30 +02:00
Pierre Krieger
d4b98e8646
Add upgrade::loop_upg ( #394 )
2018-08-10 16:55:47 +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
e74e3f4950
Remove the AsyncRead/Write bounds in ConnectionUpgrade ( #302 )
2018-07-14 14:12:19 +02:00
Pierre Krieger
03947908b4
Add upgrade::toggleable ( #281 )
...
* Add upgrade::toggleable
* Some minor fixes/improvements
2018-07-03 16:10:15 +02:00
Pierre Krieger
7b375798a5
The Multiaddr of the remote is now a Future ( #249 )
...
* The Multiaddr of the remote is now a Future
* The multiaddress future in swarm is now a Box
2018-06-19 14:38:55 +02:00
Pierre Krieger
c1cd10c034
upgrade::or() requires same Output ( #218 )
2018-05-24 16:37:12 +02:00
Toralf Wittner
445ae17904
Move SimpleProtocol
from core
to libp2p
. ( #212 )
...
cf. issue #200
2018-05-23 16:27:55 +02:00
Pierre Krieger
a163e81e30
Rename EitherSocket to EitherOutput ( #201 )
2018-05-23 11:45:35 +02:00
Toralf Wittner
86a21fc43e
Remove all target
s from log statements. ( #195 )
...
The default uses crate + module path anyway, so `target` has been
redundant, causes more work when renaming crates and makes log
lines longer.
2018-05-17 15:14:13 +02:00
Pierre Krieger
5c1890e66a
Rename libp2p_swarm to libp2p_core ( #189 )
2018-05-16 12:59:36 +02:00