Closed Aeroxander closed 7 years ago
Which version of socketcluster-server you are using right now? Just make sure it is latest one.
5.9.0
I'm also getting Object reference not set to an instance of an object in Socket.cs line 148: id = (string) ((JObject)dataobject).GetValue("id"); but that's only sometimes when I restart and send with my client often and then sometimes it doesn't send but that could also be my fault..
Ok is it working fine for now? I think that wont be creating any problem for transferring messages
At the error of object reference, just try to print the instance of object and make sure it is correct, then try to cast it :)
It isn't working yet, it almost looks like the server receives something that goes wrong, and gives a weird empty websocket back that gives me the object reference error. I'm trying to send a small base64 image to the javascript client, it works like 1 time and then it gives me that error or nothing.
Hey you can ask the same on gitter, because I'm not the author of js client. The link is https://gitter.im/SocketCluster/socketcluster
So I fixed the error by putting a thread.sleep in the mid section of my code, I guess I was doing things to fast after each other haha :D
Yeah I think so :), if you want to contribute to the client, fork it, make changes and create pull request. I think its still not stable for unity :p
I'd be glad to if I have some spare time! Any hints where I can improve?
Can you make project ready to be get uploaded on Nuget? I think it will facilitate resolving dependencies based on variety of builds.
Alright so the solution was in Socket.cs in websocket_MessageReceived to use if (e.Message.Contains("1") && !e.Message.Contains("data"))
instead of e.Message == "#1"
. This seems to do the trick, don't know a shorter way other than converting the json to object and then checking if it's null but that gave me an error.
Yeah, maybe :). Just let me know once you get it right.
So I just setup a basic socketcluster server with this C# client and javascript client but I'm getting this time out error:
Don't know what to do with this :|
People had this with other outdated clients, is that the problem?
Anyway thanks for your great work! Other than this it's working fine :D