Veritius / bevy_stardust

A flexible networking crate for Bevy.
Apache License 2.0
41 stars 1 forks source link

Streaming API #15

Open Veritius opened 7 months ago

Veritius commented 7 months ago

Is an API for sending streams of bytes worth the effort? Datagrams (messages) would still be the main method of transmitting information, but you could also use a stream of bytes.

I can't think of any use cases beyond something like tunnelling data from other protocols, like in some kind of transport-agnostic VOIP implementation. Maybe it's useful in sending large files with congestion control, like images. Though, you could have the same results with messages, a bit of elbow grease, and a well-made transport layer.

Doing this would require transport layers to implement it too, which is a lot of effort, especially if it's a datagram-oriented transport layer, at which point they'd have to implement streaming themselves.