Closed zzragida closed 7 years ago
but python socket.io is correct working maybe node.js server sample or library bug?
I'll try and check it ASAP~
tested on Unity 5.6.1
By the way, my python socket.io sample not working completely on unity connect callback not called.
socket.On("connect", () => { Debug.Log("Hello, socket.io~"); // not called });
Hello~ Recently, socket.io upgraded to v2.0.2 and it's not working on 'socket.io-client-unity3d'. 'socket.io-client-unity3d' only supports upto v1.7.4. So if you're working on Node.js, plz downgrade socket.io v1.7.4. You can do that by 'npm install socket.io@1.7.4'
We'll make an issue related to v.2.0.2 compatibility and solve this ASAP~
@ppz0th Confirm this issue i solve it. Thank you for comment.
Relative issue #2 Support socket.io v2.0.2
. Closed this issue
all samples not working because json parse exception.
here is call stack ArgumentException: JSON parse error: The document root must not follow by other values. UnityEngine.JsonUtility.FromJson[PollingUrlAnswer] (System.String json) (at C:/buildslave/unity/build/artifacts/generated/common/modules/JSONSerialize/JsonUtilityBindings.gen.cs:25) socket.io.SocketInitializer+c__Iterator0.MoveNext () (at Assets/Plugins/socket.io/SocketInitializer.cs:169)
UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)
maybe json format changed