/// <summary> /// 触发重新发送事件 /// </summary> /// <param name="e">包含事件的参数</param> protected virtual void OnPackageResend(PackageSendEventArgs e) { if (PackageResend != null) { PackageResend(this, e); } IpmEvents.OnUdpPackageResend(_ipmClient, e); }
/// <summary> /// 当数据发送失败时调用 /// </summary> /// <param name="e">包含事件的参数</param> protected virtual void OnPackageSendFailure(PackageSendEventArgs e) { if (PackageSendFailure != null) { PackageSendFailure(this, e); } IpmEvents.OnUdpPackageSendFailure(_ipmClient, e); }
/// <summary> /// 当事件触发时调用 /// </summary> /// <param name="e"></param> protected virtual void OnIpValidateRequired(IpValidateRequiredEventArgs e) { if (IpValidateRequired != null) { IpValidateRequired(this, e); } IpmEvents.OnUdpIpValidateRequired(_ipmClient, e); }
/// <summary> /// 主机消息包被丢弃时,被调用 /// </summary> /// <param name="e"></param> protected virtual void OnPackageDroped(NetworkPackageEventArgs e) { if (PackageDroped != null) { PackageDroped(this, e); } IpmEvents.OnUdpPackageDroped(_ipmClient, e); }
protected void OnNetworkError(EventArgs e) { if (NetworkError != null) { NetworkError(this, e); } IpmEvents.OnUdpNetworkError(_ipmClient, e); }
protected virtual void OnFileSystemOperationError(FileSystemOperationErrorEventArgs e) { if (FileSystemOperationError == null) { return; } IpmEvents.OnTcpThreadFileSystemOperationError(_client, e); if (!IPMClient.NeedPostMessage) { FileSystemOperationError(this, e); } else { if (scpcFileSystemOperationError == null) { scpcFileSystemOperationError = (s) => FileSystemOperationError(this, s as FileSystemOperationErrorEventArgs); } IPMClient.SendASynchronizeMessage(scpcFileSystemOperationError, e); } }
protected virtual void OnNetworkError(EventArgs e) { if (NetworkError == null) { return; } IpmEvents.OnTcpNetworkError(this); if (!IPMClient.NeedPostMessage) { NetworkError(this, e); } else { if (scpcNetworkError == null) { scpcNetworkError = (s) => { NetworkError(this, s as EventArgs); } } ; IPMClient.SendASynchronizeMessage(scpcNetworkError, e); } }