socket.io-client-unity3d icon indicating copy to clipboard operation
socket.io-client-unity3d copied to clipboard

Parsing is not working properly. (And Disconnect issues)

Open KimChungHo opened this issue 7 years ago • 1 comments

When I intialize a Socket I need to put JSON data in the PollingUrlAnswer class, but it does not parse correctly and I get an error. I eventually parsed the last part of the string.LastIndexOf ('}') method, but I think the code should be fixed.

Other than that, the Disconnect event does not work. Is this a bug?

Socket intitialize를 할 때 PollingUrlAnswer 클래스에 JSON 데이터를 넣어야 하는데(SocketInitializer.cs 파일의 140번째 정도의 줄) 파싱이 제대로 되지 않아 에러가 납니다. 해당 이슈에 대하여 이미 보고된 것을 봤지만 고쳐지지 않은 것 같습니다. string.LastIndexOf('}') 메소드로 뒷부분을 잘라내서 결국 파싱을 했습니다만 코드가 고쳐져야 하지 않을까 하는 생각이 듭니다.

다른 내용이지만, Disconnect 이벤트가 동작하지 않는데 혹시 버그인가요?

KimChungHo avatar Jan 23 '18 01:01 KimChungHo

ArgumentException: JSON parse error: The document root must not follow by other values. socket.io.SocketInitializer+<InitCore>c__Iterator0.MoveNext () (at Assets/Plugins/socket.io/SocketInitializer.cs:143)

현재 릴리즈버전 1.1.2 에서 상기 한것과 같은 버그가 있었고 위엣분이 말씀하신대로 해결했습니다 감사합니다.

Rocher0724 avatar May 10 '18 05:05 Rocher0724