Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebSocketTransport Support? #175

Open
brian-kryptomon opened this issue Jul 20, 2022 · 5 comments
Open

WebSocketTransport Support? #175

brian-kryptomon opened this issue Jul 20, 2022 · 5 comments

Comments

@brian-kryptomon
Copy link

I have been trying to get the WebSocketTransport to work and have found a few issues so I wasn't sure if this was still being supported.

There are issues with the JSWebSocketClient.jslib as it throws Runtime not found errors - from what I have read the newer versions of unity no longer support Runtime.dyncall and you have to do something like Module['dyncall_v#']. I tried to make these changes and I no longer receive the errors but now I am getting Netcode warnings:

[Netcode] Received a packet too small to contain a BatchHeader. Ignoring it.

My server is getting the messages correctly now but messages going down to the client seem to give the above warning and the message isn't processed.

Anyone come across this or know who wrote this package originally?

@brian-kryptomon
Copy link
Author

@LukeStampfli You seem to be one of the most active people here - any ideas?

@LukeStampfli
Copy link
Contributor

I haven't worked on the WebSocketTransport and I don't work at Unity anymore so I'm not sure what's wrong here. Maybe the websocket transport for some reason passes empty messages of size 0 up to the Netcode layer if it polls and there is no incoming message?

@brian-kryptomon
Copy link
Author

I haven't worked on the WebSocketTransport and I don't work at Unity anymore so I'm not sure what's wrong here. Maybe the websocket transport for some reason passes empty messages of size 0 up to the Netcode layer if it polls and there is no incoming message?

Thanks for replying - I was using a NetworkDelivery method that fragmented the messages which seems to not be supported in WebSocketTransport. I swapped to Reliable and I was able to get it working now and now just have one call that is too large and not sending. I had swapped delivery method because I had a large payload being sent at the start of the game.

Do you know if I post my fix if it can be incorporated into the WebSocketTransport?

@brian-kryptomon
Copy link
Author

@LukeStampfli I was able to fix some bugs related to this transport and the new jslib required for newer versions of Unity. I'm assuming I'm allowed to create a branch and request a merge to fix the issues?

@nicholas-maltbie
Copy link
Contributor

Opened PR #188 to attempt to address this issue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants