GodotSocketIO icon indicating copy to clipboard operation
GodotSocketIO copied to clipboard

Never Connects

Open sinfulspartan opened this issue 2 years ago • 4 comments

It seems like the handshake never works. It isn't able to get socket io to send the open packet with the sid. Also I confirmed that the browsers socket.io-client works and can connect to the server.

sinfulspartan avatar Oct 13 '23 00:10 sinfulspartan

Figured out the solution: /socket.io/ was missing from the url string

func _init(url: String): url = _preprocess_url(url) _url = "%ssocket.io/?EIO=4&transport=websocket" % url

sinfulspartan avatar Oct 13 '23 01:10 sinfulspartan

I see this depends on the setup of your socket io server. You can also append socket.io to the end of url if that's the default setup.

teamclouday avatar Oct 13 '23 01:10 teamclouday

Got it. This was a fresh node and socket io setup. So I’m guessing this is the default. May just put a comment that it may need this to connect. Anyway thanks for making this. On Oct 12, 2023, at 9:21 PM, teamclouday @.***> wrote: I see this depends on the setup of your socket io server. You can also append socket.io to the end of url if that's the default setup.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

sinfulspartan avatar Oct 13 '23 01:10 sinfulspartan

Thanks for point it out! Will add to the README

teamclouday avatar Oct 13 '23 01:10 teamclouday