• 大小: 0.04M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2020-12-14
  • 语言: C#
  • 标签: Socket  C#  c  源码  UDP  

资源简介

C#基于UDP协议的Socket通信整套源码(包括发送端和接收端)

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.Net.Sockets;
using System.Threading;

namespace Socket1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender EventArgs e)
        {
            //IPAddress groupAddress = IPAddress.Parse(“192.168.140.168“);
            //Socket Listener = new Socket(AddressFamily.InterNetwork SocketType.Dgram ProtocolType.Udp);
            //Listener.SetSocketOption(SocketOptionLevel.Socket SocketOptionName.ReuseAddress 1);
            //Listener.Bind(new IPEndPoint(IP

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2016-04-18 11:17  Socket1\
     目录           0  2016-04-18 11:17  Socket1\Socket1\
     文件         910  2008-01-23 15:43  Socket1\Socket1.sln
     文件       19456  2009-02-04 09:50  Socket1\Socket1.suo
     目录           0  2016-04-18 11:17  Socket1\Socket1\bin\
     目录           0  2016-04-18 11:17  Socket1\Socket1\bin\Debug\
     文件           3  2008-01-24 11:07  Socket1\Socket1\bin\Debug\a.bat
     文件        3495  2008-01-24 11:25  Socket1\Socket1\bin\Debug\h.txt
     文件       24576  2008-01-25 14:45  Socket1\Socket1\bin\Debug\Socket1.exe
     文件       26112  2008-01-25 14:45  Socket1\Socket1\bin\Debug\Socket1.pdb
     文件        5632  2005-11-11 22:25  Socket1\Socket1\bin\Debug\Socket1.vshost.exe
     文件        1044  2008-01-24 10:57  Socket1\Socket1\Form1.cs
     文件        1458  2008-01-24 17:17  Socket1\Socket1\Form1.Designer.cs
     文件        5814  2008-01-24 10:20  Socket1\Socket1\Form1.resx
     目录           0  2016-04-18 11:17  Socket1\Socket1\obj\
     目录           0  2016-04-18 11:17  Socket1\Socket1\obj\Debug\
     文件         829  2008-01-25 14:27  Socket1\Socket1\obj\Debug\Socket1.csproj.GenerateResource.Cache
     文件       24576  2008-01-25 14:45  Socket1\Socket1\obj\Debug\Socket1.exe
     文件         180  2008-01-24 10:22  Socket1\Socket1\obj\Debug\Socket1.Form1.resources
     文件       26112  2008-01-25 14:45  Socket1\Socket1\obj\Debug\Socket1.pdb
     文件         180  2008-01-25 14:27  Socket1\Socket1\obj\Debug\Socket1.Server1.resources
     目录           0  2016-04-18 11:17  Socket1\Socket1\obj\Debug\TempPE\
     文件         255  2008-01-25 17:18  Socket1\Socket1\obj\Socket1.csproj.FileList.txt
     文件         831  2009-02-04 09:50  Socket1\Socket1\obj\Socket1.csproj.FileListAbsolute.txt
     文件        2767  2008-01-24 17:11  Socket1\Socket1\Program.cs
     目录           0  2016-04-18 11:17  Socket1\Socket1\Properties\
     文件        1185  2008-01-23 15:43  Socket1\Socket1\Properties\AssemblyInfo.cs
     文件        6119  2008-01-25 14:45  Socket1\Socket1\Server1.cs
     文件       10477  2008-01-25 14:26  Socket1\Socket1\Server1.Designer.cs
     文件        5814  2008-01-25 14:26  Socket1\Socket1\Server1.resx
     文件        2816  2008-01-24 11:46  Socket1\Socket1\Socket1.csproj
............此处省略0个文件信息

评论

共有 条评论