nhn / socket.io-client-unity3d

socket.io-Client for Unity3D, which is compatible with socket.io v1.x
Other
167 stars 42 forks source link

disconnect client #22

Open farzadi opened 7 years ago

farzadi commented 7 years ago

Hi I have some questions 1.How we can disconnect the client. I want disconnect client when a user has bad internet connection.

  1. Some times disconnect message received with a delay in server side. I close game and it receives after some minutes and some times I get message immediately
    1. and after I upgrade to your new version I can't send any message why? I can just connect
ppz0th commented 7 years ago

@farzadi

  1. We have created an issue on it.
  2. Disconnect event doesn't occur just after the server disconnected. It occurs when the client tries to send or receive a message. (If you don't send or receive anything, you have to wait the socket to send Ping message. The default Ping message interval is 60 secs)
  3. If you send a JSON-formated message, you have to use EmitJson() method. If you send the raw-string message, use Emit() method.
farzadi commented 7 years ago

Thank you for your reply is there any method I can use to get ping value?