private void ReleaseResources() { if (heatbeatService != null) { this.heatbeatService.Destroy(); this.heatbeatService = null; } }
public void HandlerHandSnake(HandSnakeResp resp) { this.heatbeatTime = resp.HeartbeatTime; this.payload = resp.Payload; if (heatbeatService == null) { heatbeatService = new HeartBeatService(this, heatbeatTime); } //heatbeatService.Start(); UnityClientEvent evt = new UnityClientEvent(UnityClientEvent.HANDSHAKE); evt.Success = resp.Success; evt.Parame = resp; parent.Dispatch(evt); }