NativeWebSocket icon indicating copy to clipboard operation
NativeWebSocket copied to clipboard

Alternative that doesn't require async/await or `#if` on web

Open mikerochip opened this issue 2 years ago • 0 comments

Hi there! Thank you @endel for this repo.

I wasn't super keen on being required to use async/await nor having to put #if !UNITY_WEBGL || UNITY_EDITOR in calling code, so I made an alternative repo that lets calling code use whatever the caller wants.

It is available here: https://github.com/mikerochip/unity-websocket

You can poll or use events. Use coroutines, async/await, Update() method. Whatever you want. You can disconnect and reconnect, and since some servers care, text will be sent as text type and byte[] as binary type.

This issue was actually inspired by your own!

mikerochip avatar Jun 23 '23 18:06 mikerochip