Closed entropylost closed 2 years ago
Oh whoops I need it to be !Send + !Sync for wasm purposes though Could probably feature gate it though.
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...
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)
But I think putting it behind a feature gate would make the most sense.
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.