public override void OnApplicationQuit() { if (init && sender != null) { try { EexitNode node = new EexitNode(); Send(node); sender.Close(); Debug.Log("Socket closed"); } catch (SocketException e) { Debug.LogError("socket close err:" + e.Message); } } }
public override void OnApplicationQuit() { if (communicator != null) { try { EexitNode node = new EexitNode(); Send(node, false); } catch (System.Exception e) { Debug.LogError(e.Message); } finally { communicator.Close(); } } }