15 Commits

Author SHA1 Message Date
Toralf Wittner
2bc8d9590d Update to bytes v0.5
Except for `multiaddr` which encapsulates its use of bytes v0.4 now.
2019-12-21 15:42:24 +01:00
Toralf Wittner
f85241dd36 Update core, tcp, secio and mplex to futures-0.3. (#1302)
* Update `rw-stream-sink` to futures-0.3.

* Update core, tcp, secio and mplex to futures-0.3.

On top of https://github.com/libp2p/rust-libp2p/pull/1301
2019-11-14 13:42:14 +01:00
Max Inden
8944899fe0 *: Remove usage of custom buffer initialization usage (#1263)
* *: Remove usage of custom buffer initialization usage

With version `0.3.0-alpha.19` the futures-preview crate makes the
`AsyncRead::initializer` API unstable.

In order to improve interoperability with e.g. both a library depending
on alpha.18 as well as a library depending on alpha.19 and in order for
rust-libp2p to become stable again, this commit removes all usages of
the unstable `initializer` API.

* protocols/noise: Remove NoiseOutput Asyncread initializer

* transports/tcp: Remove TcpTransStream AsyncRead initializer

* *: Remove version pinning of futures-preview to 0.3.0-alpha.18

With version 0.3.0-alpha.19 the futures-preview crate makes the
AsyncRead::initializer API unstable. Given that the previous commits
removed usage of the initializer API, the version pinning is not needed
any longer.
2019-11-01 16:53:11 +01:00
Toralf Wittner
9921a335e1
Upgrade websocket transport to soketto 0.3.0. (#1266)
Upgrade websocket transport to soketto 0.3.0.
2019-10-08 11:50:12 +02:00
Pierre Krieger
170d2d268f
Switch to stable futures (#1196)
* Switch to stable futures

* Remove from_fn

* Fix secio

* Fix core --lib tests
2019-09-16 11:08:44 +02:00
Toralf Wittner
e56c4c10ed Reimplement the websocket transport. (#1150)
* Begin reimplementing the websocket transport.

* Add TLS support.

* Add support for redirects during handshake.

* Cosmetics.

* Remove unused error cases in tls module.

Left-overs from a previous implementation.

* No libp2p-websocket for wasm targets.

* Change tls::Config to make the server optional.

* Update transports/websocket/src/lib.rs

Co-Authored-By: Pierre Krieger <pierre.krieger1708@gmail.com>

* Duplicate config methods.

As per PR review feedback.
2019-06-04 11:47:20 +02:00
Pierre Krieger
c2398adf67
Add implementations of prepare_uninitialized_buffer and read_buf where relevant (#1107)
* Fix #1080

* Fix browser WebSockets
2019-05-10 11:26:18 +02:00
Pierre Krieger
f6cbafecbd
Fix error being ignored in RwSinkStream (#989)
* Fix error being ignored in RwSinkStream

* Add test for partial reading

* Update misc/rw-stream-sink/src/lib.rs

Co-Authored-By: tomaka <pierre.krieger1708@gmail.com>
2019-03-01 12:08:49 +01:00
Roman Borschel
eeed66707b Address edition-2018 idioms. (#929) 2019-02-11 14:58:15 +01:00
Toralf Wittner
e23b2733e2
Fix some rustc/clippy warnings. (#895) 2019-01-30 15:41:54 +01:00
Toralf Wittner
f833c5d9ff
rw-stream-sink: Add regression test. (#683)
Closes #679.
2018-11-26 13:36:47 +01:00
Toralf Wittner
aa86f6824d
rw-stream-sink: Skip over empty stream items. (#677)
Otherwise it may report the reading of 0 bytes which is interpreted as
EOF by consumers of `std::io::Read::read`.
2018-11-23 13:54:17 +01:00
Toralf Wittner
3f3d81cc95
Map AsyncWrite::shutdown to Sink::close. (#505) 2018-09-21 10:10:45 +02:00
Pierre Krieger
0c43c76965
Implement close() from Sink (#492) 2018-09-17 15:01:37 +02:00
Benjamin Kampmann
2ea49718f3
Clean up directory structure (#426)
* Remove unused circular-buffer crate
* Move transports into subdirectory
* Move misc into subdirectory
* Move stores into subdirectory
* Move multiplexers
* Move protocols
* Move libp2p top layer
* Fix Test: skip doctest if secio isn't enabled
2018-08-29 11:24:44 +02:00