예제 #1
0
        static bool ExtensionPacketHeaderMatches(ILocalPeerExtension extension, byte[] data)
        {//todo unsafe
            var h = extension.PayloadPacketHeader;

            if (h != null)
            {
                if (data.Length >= h.Length)
                {
                    for (int i = 0; i < h.Length; i++)
                    {
                        if (data[i] != h[i])
                        {
                            return(false);
                        }
                    }
                    return(true);
                }
            }
            return(false);
        }
예제 #2
0
 void ILocalPeer.HandleException(ILocalPeerExtension extension, Exception exception)
 {
     HandleException(extension.ExtensionId, exception);
 }
예제 #3
0
 void ILocalPeer.WriteToLog(ILocalPeerExtension extension, string message)
 {
     WriteToLog(extension.ExtensionId, message);
 }
예제 #4
0
 void ILocalPeer.WriteToLog_deepDetail(ILocalPeerExtension extension, string message)
 {
     WriteToLog_deepDetail(extension.ExtensionId, message);
 }