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

资源简介

用C#的Socket实现UDP协议进行通讯和文件传输,因为属于练手项目,所以文件传输部分对大文件传输会有掉包的情况,对于刚学Socket和协议的朋友可以拿去学习一下。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace UdpPacks
{
    [Serializable]
    public class UdpPack
    {
        public int id { get; set; }
        public int count { get; set; }
        public byte[] pack { get; set; }
        public long bl { get; set; }
        public byte[] packname { get; set; }
    }
}

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

     文件       1495  2018-05-13 23:34  Communications\Communications.sln

    ..A..H.     69632  2018-05-14 08:25  Communications\Communications.v12.suo

     文件       5120  2018-05-13 23:34  Communications\UdpPacks\bin\Debug\UdpPacks.dll

     文件       7680  2018-05-13 23:34  Communications\UdpPacks\bin\Debug\UdpPacks.pdb

     文件       6539  2018-05-14 08:17  Communications\UdpPacks\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件          0  2018-05-13 23:31  Communications\UdpPacks\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs

     文件          0  2018-05-13 23:31  Communications\UdpPacks\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs

     文件          0  2018-05-13 23:31  Communications\UdpPacks\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs

     文件        363  2018-05-13 23:34  Communications\UdpPacks\obj\Debug\UdpPacks.csproj.FileListAbsolute.txt

     文件       1771  2018-05-13 23:34  Communications\UdpPacks\obj\Debug\UdpPacks.csprojResolveAssemblyReference.cache

     文件       5120  2018-05-13 23:34  Communications\UdpPacks\obj\Debug\UdpPacks.dll

     文件       7680  2018-05-13 23:34  Communications\UdpPacks\obj\Debug\UdpPacks.pdb

     文件       1340  2018-05-13 23:31  Communications\UdpPacks\Properties\AssemblyInfo.cs

     文件        415  2018-05-13 23:34  Communications\UdpPacks\UdpPack.cs

     文件       2408  2018-05-13 23:34  Communications\UdpPacks\UdpPacks.csproj

     文件        189  2018-05-08 14:17  Communications\WinCommunication\App.config

     文件          0  2018-05-13 23:36  Communications\WinCommunication\bin\Debug\555.txt

     文件       5120  2018-05-13 23:34  Communications\WinCommunication\bin\Debug\UdpPacks.dll

     文件       7680  2018-05-13 23:34  Communications\WinCommunication\bin\Debug\UdpPacks.pdb

     文件      19968  2018-05-13 23:34  Communications\WinCommunication\bin\Debug\WinCommunication.exe

     文件        189  2018-05-08 14:17  Communications\WinCommunication\bin\Debug\WinCommunication.exe.config

     文件      40448  2018-05-13 23:34  Communications\WinCommunication\bin\Debug\WinCommunication.pdb

     文件      24224  2018-05-14 08:18  Communications\WinCommunication\bin\Debug\WinCommunication.vshost.exe

     文件        189  2018-05-08 14:17  Communications\WinCommunication\bin\Debug\WinCommunication.vshost.exe.config

     文件        490  2015-07-10 19:01  Communications\WinCommunication\bin\Debug\WinCommunication.vshost.exe.manifest

     文件      14530  2018-05-13 23:20  Communications\WinCommunication\frmCommunication.cs

     文件       8123  2018-05-13 22:50  Communications\WinCommunication\frmCommunication.Designer.cs

     文件       5817  2018-05-13 22:42  Communications\WinCommunication\frmCommunication.resx

     文件        976  2018-05-13 22:34  Communications\WinCommunication\frmPopups.cs

     文件       2119  2018-05-13 22:34  Communications\WinCommunication\frmPopups.Designer.cs

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

评论

共有 条评论