public override void HandleDestroy()
 {
     //Debug.Log("BridgeTransportSocketIO: HandleDestroy: this: " + this + " bridge: " + bridge);
     if (socket != null)
     {
         socket.Close();
         socket = null;
     }
 }
 public void Close()
 {
     if (mySocketIO != null)
     {
         mySocketIO.Close();
         mySocketIO = null;
     }
     try
     {
         mySocket.Close();
     }
     catch
     {
         // We're closing.. don't worry about it
     }
 }
    public void DisconnectSocket()
    {
        //Hay que chequear esto

        if (stateBool)
        {
            socket.Emit("disconnect");
            // socket.Emit("disconnect");

            socket.Close();
            RestartGame();
            // Destroy(GameObject.Find(client_id));

            // socket = null;
        }
        else
        {
            Debug.Log("Estas Desconectado");
        }
        // Connect.GetComponentInChildren<Text>().text = "Connect";
        // Connect.onClick.AddListener(GetSocketConnection);
    }
Example #4
0
 private void OnApplicationQuit()
 {
     socket.Close();
 }
Example #5
0
 void OnDestroy()
 {
     socket.Close();
 }