当前位置: 首页>>代码示例>>C#>>正文


C# LLClientView.SendImageNotFound方法代码示例

本文整理汇总了C#中LLClientView.SendImageNotFound方法的典型用法代码示例。如果您正苦于以下问题:C# LLClientView.SendImageNotFound方法的具体用法?C# LLClientView.SendImageNotFound怎么用?C# LLClientView.SendImageNotFound使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LLClientView的用法示例。


在下文中一共展示了LLClientView.SendImageNotFound方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SendFirstPacket

        private bool SendFirstPacket(LLClientView client)
        {
            if (client == null)
                return false;

            if (m_asset == null)
            {
                MainConsole.Instance.Warn("[J2KIMAGE]: Sending ImageNotInDatabase for texture " + TextureID);
                client.SendImageNotFound(TextureID);
                return true;
            }
            if (m_asset.Length <= FIRST_PACKET_SIZE)
            {
                // We have less then one packet's worth of data
                client.SendImageFirstPart(1, TextureID, (uint) m_asset.Length, m_asset, 2);
                m_stopPacket = 0;
                return true;
            }
            // This is going to be a multi-packet texture download
            byte[] firstImageData = new byte[FIRST_PACKET_SIZE];

            try
            {
                Buffer.BlockCopy(m_asset, 0, firstImageData, 0, FIRST_PACKET_SIZE);
            }
            catch (Exception)
            {
                MainConsole.Instance.ErrorFormat(
                    "[J2KIMAGE]: Texture block copy for the first packet failed. textureid={0}, assetlength={1}",
                    TextureID, m_asset.Length);
                return true;
            }

            client.SendImageFirstPart(TexturePacketCount(), TextureID, (uint) m_asset.Length, firstImageData,
                                      (byte) ImageCodec.J2C);
            return false;
        }
开发者ID:nathanmarck,项目名称:Aurora-Sim,代码行数:37,代码来源:J2KImage.cs

示例2: SendFirstPacket

 public bool SendFirstPacket(LLClientView client)
 {
     // this means we don't have 
     if (Data == null) 
     {
         client.SendImageNotFound(m_requestedUUID);
         m_log.WarnFormat("[TEXTURE]: Got null Data element on a asset {0}..  and the missing image Data property is al", m_requestedUUID);
         return true;
     }
     // Do we have less then 1 packet's worth of data?
     else if (m_asset.Data.Length <= cFirstPacketSize)
     {
         // Send only 1 packet
         client.SendImageFirstPart(1, m_requestedUUID, (uint)m_asset.Data.Length, m_asset.Data, 2);
         m_stopPacket = 0;
         return true;
     }
     else
     {
         byte[] firstImageData = new byte[cFirstPacketSize];
         try 
         { 
             Buffer.BlockCopy(m_asset.Data, 0, firstImageData, 0, (int)cFirstPacketSize);
             client.SendImageFirstPart(TexturePacketCount(), m_requestedUUID, (uint)m_asset.Data.Length, firstImageData, 2);                
         }
         catch (Exception)
         {
             m_log.Error("Texture block copy failed. Possibly out of memory?");
             return true;
         }
     }
     return false;
 }
开发者ID:ChrisD,项目名称:opensim,代码行数:33,代码来源:J2KImage.cs


注:本文中的LLClientView.SendImageNotFound方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。