Open meytotr opened 2 years ago
This error is solved now?
If someone is able to resolve this or found a different solution/library then, please reply. It would be really helpful.
Is there a service available for testing?
I have just tried to create a socket.io server on glitch, then use this lib to connect. It seems that glitch require a User-Agent header
using var io = CreateSocketIO();
io.Options.ExtraHeaders = new Dictionary<string, string>()
{
["User-Agent"] =
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36 Edg/110.0.1587.50",
};
await io.ConnectAsync();
I have tried with above code, but I got same error result.
I've fixed it, need to do this in 3.0.8
using var io = CreateSocketIO();
io.Options.AutoUpgrade = false;
io.Options.ExtraHeaders = new Dictionary<string, string>()
{
["User-Agent"] =
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36 Edg/110.0.1587.50",
};
await io.ConnectAsync();
reasons:
I deployed socket server on aws. other clients(python, nodejs, java) are running well. but only C# has an error.
Same error.
It works very well with unity IDE but with a real android device, it never connects to the socket io server.
its work for localhost or ipadress:port.. but not work for glitch or heroku.. not work for remote server