Пример #1
0
 /// <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);
     }
 }
Пример #2
0
 /// <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);
     }
 }
Пример #3
0
        /// <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);
        }