Exemplo n.º 1
0
        /// <summary>
        /// Request file sources from server.
        /// </summary>
        /// <param name="FileHash">Hash of the file.</param>
        public void RequestSources(byte[] FileHash)
        {
            MemoryStream      buffer         = new MemoryStream();
            CServerAskSources RequestSources = new CServerAskSources(FileHash, buffer);

            if (m_ServerConnection != null)
            {
                m_ServerConnection.SendPacket(buffer);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Request file several sources in one TCP frame from server.
        /// </summary>
        /// <param name="FileHashes">Array with the file hashes.</param>
        public void RequestSources(ArrayList FileHashes)
        {
            MemoryStream      buffer = new MemoryStream();
            CServerAskSources RequestSources;

            foreach (byte[] FileHash in FileHashes)
            {
                RequestSources = new CServerAskSources(FileHash, buffer);
                Debug.WriteLine("Asking file " + CKernel.HashToString(FileHash));
            }
            if (m_ServerConnection != null)
            {
                m_ServerConnection.SendPacket(buffer);
            }
        }
Exemplo n.º 3
0
 /// <summary>
 /// Request file several sources in one TCP frame from server.
 /// </summary>
 /// <param name="FileHashes">Array with the file hashes.</param>
 public void RequestSources(ArrayList FileHashes)
 {
     MemoryStream buffer=new MemoryStream();
     CServerAskSources RequestSources;
     foreach (byte[] FileHash in FileHashes)
     {
         RequestSources=new CServerAskSources(FileHash,buffer);
         Debug.WriteLine("Asking file "+CKernel.HashToString(FileHash));
     }
     if (m_ServerConnection!=null) m_ServerConnection.SendPacket(buffer);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Request file sources from server.
 /// </summary>
 /// <param name="FileHash">Hash of the file.</param>
 public void RequestSources(byte[] FileHash)
 {
     MemoryStream buffer=new MemoryStream();
     CServerAskSources RequestSources=new CServerAskSources(FileHash,buffer);
     if (m_ServerConnection!=null) m_ServerConnection.SendPacket(buffer);
 }