TransferDoneNotify() private method

private TransferDoneNotify ( DccTransferClient client ) : void
client DccTransferClient
return void
        protected override void DoTransfer()
        {
            var buf = new byte[8192];
            int n   = 0;

            try
            {
                n = m_fstream.Read(buf, 0, buf.Length);
            }
            catch (Exception ex)
            {
                Dcc.TransferFailedNotify(this, ex);
                Shutdown();
                return;
            }

            if (n > 0)
            {
                try
                {
                    m_sock.BeginSend(buf, 0, n, SocketFlags.None, new AsyncCallback(OnSend), null);
                }
                catch (Exception ex)
                {
                    Dcc.TransferFailedNotify(this, ex);
                    Shutdown();
                }
            }

            else
            {
                Dcc.TransferDoneNotify(this);
            }
        }
Beispiel #2
0
 protected override void DoTransfer()
 {
     try
     {
         var buf = new byte[4096];
         if ((m_bytesTransfered + StartPosition) < TotalLength && m_sock.Connected)
         {
             m_sock.BeginReceive(buf, 0, buf.Length, SocketFlags.None, new AsyncCallback(OnReceive), buf);
             return;
         }
     }
     catch (Exception e)
     {
         Dcc.TransferFailedNotify(this, e);
         Shutdown();
         return;
     }
     Dcc.TransferDoneNotify(this);
 }