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); }
private void OnApplicationQuit() { socket.Close(); }
void OnDestroy() { socket.Close(); }