Can't connect to websocket from Unity #100
Replies: 5 comments
-
|
Hello! @Naokim-NHZ
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
I'm sorry about "WebSocketClients" property missed. I didn't implement that, because I created prototype of API usage, just after programming that API, reason why: sometimes documentation resources is different than implemented resources.
Now I'll go check your code on Netly Unity Project after see, if is a mistake or internal error and fix. and send you updated dll's or use updated source code.
Wait for my quickly reply. See you later! 🫰
…---- On dom, 13 jul 2025 23:34:27 +0200 ***@***.*** wrote ----
Thanks for the quick answer, I greatly appreciate it. Sadly, it still doesn't work :( .
https://github.com/user-attachments/assets/f61a533f-8d50-4ac4-b141-1103f8de6c5e
https://github.com/user-attachments/assets/cb292e9d-e7ce-4745-b9b3-aedeb00381de
Although, there is other things I don't get from the main page sample :
First, the server doesn't have any "WebSocketClients" property available. Idk, if that is an issue.
https://github.com/user-attachments/assets/a82f0ee0-5ae5-4526-8fd4-dbce83e004ea
Second, still on server part : there is one line to Open the server, and one to open the client ? Do we have to connect to the http server, then store the "client web socket" on the server and open the "echo" path afterward ? Once again, I've tried different setup and it always yield the "Can't connect" error.
https://github.com/user-attachments/assets/549b7a70-85f8-4fe1-a6c0-5ccc362c7329
—
Reply to this email directly, #100 (comment) , or https://github.com/notifications/unsubscribe-auth/AX7TDR6OKRHEZBJ2VCB7OO33ILGGHAVCNFSM6AAAAACBNLQJXKVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTGNZUGU4TENI .
You are receiving this because you commented.
|
Beta Was this translation helpful? Give feedback.
-
|
Hello, I've try to investigate further and I've find a lead, doing so :
So it seems the issue is Unity not being able to host the server. But it silently fails, since no exception are raised. Anyway, Unity Transport Protocol (the thing they use for their new multiplayer solution) mention they use websocket under the hood. And that, on every platform, even WebGL. Hope it can help. |
Beta Was this translation helpful? Give feedback.
-
|
Hey. Thankful about you contribution.
I'm so sorry I got so busy. I didn't investigate about this issue.
But I'll investigate and solve that when time available... I need make it working on WebGL, what I think: someone @nvh2001 told me: alec1o/Byter#28 (comment) (WebGL) can't build dll, so I think build using mono, il2cpp, using Netly source code instead of dll. I'll try this things. but after try impl. raw websocket client, or maybe try using original dotnet dll... but I think it can work (unity side)
…---- On ter, 15 jul 2025 17:54:34 +0200 ***@***.*** wrote ----
Hello,
I've try to investigate further and I've find a lead, doing so :
Same program in two .NET console program : Works perfectly 🆗
Server is a .NET console program and Client is in Unity : Works perfectly 🆗
Server is Unity and client is a .NET console program : Client failed to connect with error 404. No matter which Unity's target platform is used.
So it seems the issue is Unity not being able to host the server. But it silently fails, since no exception are raised.
Maybe they limit connection somehow and there is a checkbox to tick somewhere.
Or maybe, because they have their own implementation of .NET dlls, they remove websocket features related to server hosting.
Anyway, https://docs-multiplayer.unity3d.com/transport/current/minimal-workflow-ws/ (the thing they use for their new multiplayer solution) mention they use websocket under the hood. And that, on every platform, even WebGL.
Hope, it can help.
Cheers
—
Reply to this email directly, #100 (comment) , or https://github.com/notifications/unsubscribe-auth/AX7TDR7BJZ6SHXOUEGL5NVL3IUP3VAVCNFSM6AAAAACBNLQJXKVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTGNZWGY3DINY .
You are receiving this because you commented.
|
Beta Was this translation helpful? Give feedback.




Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm trying to send data between two unity application, one "main" server on standalone and one "display" on WebGL.
The final goal is to communicate data from a game to a stream overlay.
I'm using the sample code on the main github page for websocket. But I keep receiving the error "WebSocketException: Unable to connect to the remote server" on the client end.
I've check, the port is not used by another program.
The server display the "OnOpen" message but that's it.
Env :
Windows 10, Unity 6000.0.41f1
Beta Was this translation helpful? Give feedback.
All reactions