• 大小: 505KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-14
  • 语言: C#
  • 标签: C#  UDP  

资源简介

在网上搜到的C#实现的UDP文件传输代码,分享给大家。局域网下速度能达到5,6M,效率还可以

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Text;
using System.Net;

namespace ReceiveFileDemo
{
    internal class ControlTag
    {
        private string _md5;
        private string _fileName;
        private IPEndPoint _remoteIP;

        public ControlTag(
            string md5
            string fileName
            IPEndPoint remoteIP)
        {
            _md5 = md5;
            _fileName = fileName;
            _remoteIP = remoteIP;
        }

        public string MD5
        {
            get { return _md5; }
            set { _md5 = value; }
        }

        public string FileName
        {
            get { return _fileName; }
            set { _fileName = value; }
        }

        public IPEndPoint RemoteIP
        {
            get { return _remoteIP; }
            set { _remoteIP = value; }
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        906  2009-08-03 10:58  UdpSendFileDemo - 6\Backup\ReceiveFileDemo\ControlTag.cs

     文件        484  2009-08-06 18:29  UdpSendFileDemo - 6\Backup\ReceiveFileDemo\Program.cs

     文件       1214  2009-07-28 16:18  UdpSendFileDemo - 6\Backup\ReceiveFileDemo\Properties\AssemblyInfo.cs

     文件       2885  2009-07-28 16:18  UdpSendFileDemo - 6\Backup\ReceiveFileDemo\Properties\Resources.Designer.cs

     文件       5612  2009-07-28 16:18  UdpSendFileDemo - 6\Backup\ReceiveFileDemo\Properties\Resources.resx

     文件       1099  2009-07-28 16:18  UdpSendFileDemo - 6\Backup\ReceiveFileDemo\Properties\Settings.Designer.cs

     文件        249  2009-07-28 16:18  UdpSendFileDemo - 6\Backup\ReceiveFileDemo\Properties\Settings.settings

     文件       3853  2009-08-06 18:30  UdpSendFileDemo - 6\Backup\ReceiveFileDemo\ReceiveFileDemo.csproj

     文件       8479  2009-08-06 18:31  UdpSendFileDemo - 6\Backup\ReceiveFileDemo\ReceiveFileForm.cs

     文件       6331  2009-08-06 18:31  UdpSendFileDemo - 6\Backup\ReceiveFileDemo\ReceiveFileForm.Designer.cs

     文件       5814  2009-08-06 18:31  UdpSendFileDemo - 6\Backup\ReceiveFileDemo\ReceiveFileForm.resx

     文件       1203  2009-07-28 16:59  UdpSendFileDemo - 6\Backup\UdpSendFile\BufferHelper.cs

     文件        791  2009-08-03 10:07  UdpSendFileDemo - 6\Backup\UdpSendFile\Command.cs

     文件       1149  2009-08-02 18:44  UdpSendFileDemo - 6\Backup\UdpSendFile\FileReceiveBufferEvent.cs

     文件        965  2009-08-02 17:29  UdpSendFileDemo - 6\Backup\UdpSendFile\FileReceiveCompleteEvent.cs

     文件       1158  2009-08-03 12:19  UdpSendFileDemo - 6\Backup\UdpSendFile\FileReceiveEvent.cs

     文件       1110  2009-08-02 18:44  UdpSendFileDemo - 6\Backup\UdpSendFile\FileSendBufferEvent.cs

     文件        910  2009-08-02 18:43  UdpSendFileDemo - 6\Backup\UdpSendFile\FileSendEvent.cs

     文件        529  2009-07-30 11:01  UdpSendFileDemo - 6\Backup\UdpSendFile\IDataCell.cs

     文件        836  2009-08-02 18:43  UdpSendFileDemo - 6\Backup\UdpSendFile\LabelClickEvent.cs

     文件       2097  2009-08-01 13:40  UdpSendFileDemo - 6\Backup\UdpSendFile\MD5Helper.cs

     文件       1206  2009-07-28 10:21  UdpSendFileDemo - 6\Backup\UdpSendFile\Properties\AssemblyInfo.cs

     文件       2841  2009-08-01 12:05  UdpSendFileDemo - 6\Backup\UdpSendFile\Properties\Resources.Designer.cs

     文件       5612  2009-07-28 10:21  UdpSendFileDemo - 6\Backup\UdpSendFile\Properties\Resources.resx

     文件       1106  2009-08-01 12:05  UdpSendFileDemo - 6\Backup\UdpSendFile\Properties\Settings.Designer.cs

     文件        249  2009-07-28 10:21  UdpSendFileDemo - 6\Backup\UdpSendFile\Properties\Settings.settings

     文件       1008  2009-07-28 16:59  UdpSendFileDemo - 6\Backup\UdpSendFile\ReadFileBufferEvent.cs

     文件        916  2009-07-28 16:59  UdpSendFileDemo - 6\Backup\UdpSendFile\ReadFileobject.cs

     文件       1177  2009-07-30 11:03  UdpSendFileDemo - 6\Backup\UdpSendFile\ReceiveDataEvent.cs

     文件       8337  2009-08-06 13:10  UdpSendFileDemo - 6\Backup\UdpSendFile\ReceiveFileManager.cs

............此处省略169个文件信息

评论

共有 条评论