资源简介

c#的UDP通讯程序,对于研究C# 进行网络通讯的可以参考。

资源截图

代码片段和文件信息

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;

namespace TestClient
{
    public partial class Form1 : Form
    {

        UDP.Client client;
        EndPoint serverEP;

        public Form1()
        {
            InitializeComponent();
            client = new UDP.Client(new System.Net.IPEndPoint(IPAddress.Any 0));
            client.RecvDatagram += new UDP.NetEventArgsHandler(client_RecvDatagram);
        }

        void client_RecvDatagram(object sender UDP.NetEventArgs e)
        {
            this.listBox1.BeginInvoke(new UDP.NetEventArgsHandler(RecvDatagram) new object[] { sender e });
     

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

     文件      20480  2008-06-06 10:54  UDP\TestClient\bin\Debug\TestClient.exe

     文件      28160  2008-06-06 10:54  UDP\TestClient\bin\Debug\TestClient.pdb

     文件       5632  2005-12-08 14:51  UDP\TestClient\bin\Debug\TestClient.vshost.exe

     文件      20480  2008-06-06 10:54  UDP\TestClient\bin\Debug\UDP.dll

     文件      19968  2008-06-06 10:54  UDP\TestClient\bin\Debug\UDP.pdb

     文件       1862  2007-12-19 13:55  UDP\TestClient\Form1.cs

     文件       5165  2007-12-19 13:55  UDP\TestClient\Form1.Designer.cs

     文件       5814  2007-12-19 13:55  UDP\TestClient\Form1.resx

     文件        842  2007-12-19 13:55  UDP\TestClient\obj\Debug\TestClient.csproj.GenerateResource.Cache

     文件      20480  2008-06-06 10:54  UDP\TestClient\obj\Debug\TestClient.exe

     文件        180  2008-06-06 10:54  UDP\TestClient\obj\Debug\TestClient.Form1.resources

     文件      28160  2008-06-06 10:54  UDP\TestClient\obj\Debug\TestClient.pdb

     文件        180  2008-06-06 10:54  UDP\TestClient\obj\Debug\TestClient.Properties.Resources.resources

     文件        327  2008-06-06 10:55  UDP\TestClient\obj\TestClient.csproj.FileList.txt

     文件        469  2007-09-06 16:10  UDP\TestClient\Program.cs

     文件       1170  2007-09-06 16:10  UDP\TestClient\Properties\AssemblyInfo.cs

     文件       2875  2007-09-06 16:10  UDP\TestClient\Properties\Resources.Designer.cs

     文件       5612  2007-09-06 16:10  UDP\TestClient\Properties\Resources.resx

     文件       1094  2007-09-06 16:10  UDP\TestClient\Properties\Settings.Designer.cs

     文件        249  2007-09-06 16:10  UDP\TestClient\Properties\Settings.settings

     文件       3424  2007-09-06 16:13  UDP\TestClient\TestClient.csproj

     文件      20480  2008-06-06 10:54  UDP\TestServer\bin\Debug\TestServer.exe

     文件      22016  2008-06-06 10:54  UDP\TestServer\bin\Debug\TestServer.pdb

     文件       5632  2005-12-08 14:51  UDP\TestServer\bin\Debug\TestServer.vshost.exe

     文件      20480  2008-06-06 10:54  UDP\TestServer\bin\Debug\UDP.dll

     文件      19968  2008-06-06 10:54  UDP\TestServer\bin\Debug\UDP.pdb

     文件       4808  2008-06-06 10:54  UDP\TestServer\obj\Debug\ResolveAssemblyReference.cache

     文件        784  2007-09-08 13:24  UDP\TestServer\obj\Debug\TestServer.csproj.GenerateResource.Cache

     文件      20480  2008-06-06 10:54  UDP\TestServer\obj\Debug\TestServer.exe

     文件      22016  2008-06-06 10:54  UDP\TestServer\obj\Debug\TestServer.pdb

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

评论

共有 条评论