private bool ConnectCore(NpCloudSocketType type, string url, Action connect) { bool result; try { this.mHandlerInstance.Active(true); this.mErrorCode = 0; this.mErrorMsg = string.Empty; this.mCloudType = NpCloud.Type.None; NpCloudSocketSystem.CreateInstance(url, type, this.mHashKey); connect(); if (this.mCloudType == NpCloud.Type.Error) { result = false; } else { result = true; } } catch (NpCloudException errorData) { this.SetErrorData(errorData); this.Exit(this.mErrorCode, this.mErrorMsg); result = false; } catch (Exception errorData2) { this.SetErrorData(errorData2); this.Exit(this.mErrorCode, this.mErrorMsg); result = false; } return(result); }