gschup / ggrs

GGRS is a reimagination of GGPO, enabling P2P rollback networking in Rust. Rollback to the future!
Other
507 stars 25 forks source link

Made the socket type generic. #29

Closed entropylost closed 2 years ago

entropylost commented 2 years ago

This is helpful for cases in which the NonBlockingSockets might not be connecting via IP address (eg. WebRTC where every peer connection is a bit more complex)

I don't think this actually will cause any breaking changes because the type parameter has a default.

entropylost commented 2 years ago

Oh whoops I need it to be !Send + !Sync for wasm purposes though Could probably feature gate it though.

gschup commented 2 years ago

I would recommend checking out the matchbox project, where there is a working WASM implementation with GGRS and bevy. Maybe we can figure this out somehow...

entropylost commented 2 years ago

Well obviously you can just Mutex the thing but I'd really prefer not (although actually mutex has 0 performance cost on single-threaded wasm)

entropylost commented 2 years ago

But I think putting it behind a feature gate would make the most sense.