/// <summary> /// Raises the <see cref="Karna.Compression.KarnaUnzip.ServiceMessage"/> event. /// </summary> /// <param name="e">The <see cref="Karna.Compression.CompressionServiceEventArgs"/> instance containing the event data.</param> protected virtual void OnReceiveServiceMessage(CompressionServiceEventArgs e) { if (ServiceMessage != null) { ServiceMessage(this, e); } }
/// <summary> /// Raises the <see cref="ApplicationMessage"/> event. /// </summary> /// <param name="e">The <see cref="Karna.Compression.CompressionServiceEventArgs"/> instance containing the event data.</param> protected virtual void OnReceiveApplicationMessage(CompressionServiceEventArgs e) { if (ApplicationMessage != null) { ApplicationMessage(this, e); } }
/// <summary> /// Processes the service message. /// </summary> /// <param name="msg">The MSG.</param> /// <param name="x">The x.</param> /// <returns></returns> internal int ProcessServiceMessage(ref CallbackString msg, uint x) { string s = InternalHelper.PCharToString(msg.Buffer); CompressionServiceEventArgs e = new CompressionServiceEventArgs(s, (int)x); OnReceiveServiceMessage(e); return(0); }