BiagioFesta / wtransport

Async-friendly WebTransport implementation in Rust
Apache License 2.0
470 stars 31 forks source link

examples: fix mismatched argument type #220

Closed bhbs closed 2 months ago

bhbs commented 2 months ago

Fixes #219

Description

createBidirectionalStream returns not WebTransportReceiveStream but WebTransportBidirectionalStream.

So, We have to pass .readable

ref: https://developer.mozilla.org/en-US/docs/Web/API/WebTransportBidirectionalStream ref: w3c/webtransport/samples/echo/client.js#72

Test

cargo run --example full
  1. Click Connect
  2. Select Open a bidirectional stream
  3. Click Send data -> Receive ACK
BiagioFesta commented 2 months ago

Thank you for the feedback and the fix :)