• 大小: 0.19M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2020-12-14
  • 语言: 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 UDPChat
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private void button1_Click(object sender EventArgs e)
        {
            Send();
        }

        public void Send()
        {
            Socket s = new Socket(AddressFamily.InterNetwork SocketType.DgramProtocolType.Udp);
            //起到广播的作用在一个段内如192.168.1.255 都是1
            IPAddress broadcast = IPAddress.Parse(this.textBox2.Text.ToString());                                                        

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件        1392  2009-02-11 08:38  sj\01\UDPChat\UDPChat.sln
     文件       22364  2009-02-11 08:40  sj\01\UDPChat\UDPChat.suo
     文件        1166  2009-02-11 08:36  sj\01\UDPChat\UDPChat\Form1.cs
     文件        4411  2009-02-11 08:36  sj\01\UDPChat\UDPChat\Form1.designer.cs
     文件        5814  2009-02-11 08:36  sj\01\UDPChat\UDPChat\Form1.resx
     文件         488  2009-02-11 08:29  sj\01\UDPChat\UDPChat\Program.cs
     文件        3725  2009-02-11 08:35  sj\01\UDPChat\UDPChat\UDPChat.csproj
     文件        9728  2009-02-11 08:39  sj\01\UDPChat\UDPChat\bin\Debug\UDPChat.exe
     文件       22016  2009-02-11 08:39  sj\01\UDPChat\UDPChat\bin\Debug\UDPChat.pdb
     文件       14328  2009-02-11 08:39  sj\01\UDPChat\UDPChat\bin\Debug\UDPChat.vshost.exe
     文件         700  2009-02-11 08:39  sj\01\UDPChat\UDPChat\obj\Debug\UDPChat.csproj.FileListAbsolute.txt
     文件         847  2009-02-11 08:39  sj\01\UDPChat\UDPChat\obj\Debug\UDPChat.csproj.GenerateResource.Cache
     文件        9728  2009-02-11 08:39  sj\01\UDPChat\UDPChat\obj\Debug\UDPChat.exe
     文件         180  2009-02-11 08:39  sj\01\UDPChat\UDPChat\obj\Debug\UDPChat.Form1.resources
     文件       22016  2009-02-11 08:39  sj\01\UDPChat\UDPChat\obj\Debug\UDPChat.pdb
     文件         180  2009-02-11 08:39  sj\01\UDPChat\UDPChat\obj\Debug\UDPChat.Properties.Resources.resources
     文件        1370  2009-02-11 08:29  sj\01\UDPChat\UDPChat\Properties\AssemblyInfo.cs
     文件        2864  2009-02-11 08:29  sj\01\UDPChat\UDPChat\Properties\Resources.Designer.cs
     文件        5612  2009-02-11 08:29  sj\01\UDPChat\UDPChat\Properties\Resources.resx
     文件        1092  2009-02-11 08:29  sj\01\UDPChat\UDPChat\Properties\Settings.Designer.cs
     文件         249  2009-02-11 08:29  sj\01\UDPChat\UDPChat\Properties\Settings.settings
     文件        1508  2009-02-11 08:38  sj\01\UDPChat\UDPServer\Form1.cs
     文件        1568  2009-02-11 08:38  sj\01\UDPChat\UDPServer\Form1.designer.cs
     文件        5814  2009-02-11 08:38  sj\01\UDPChat\UDPServer\Form1.resx
     文件         490  2009-02-11 08:37  sj\01\UDPChat\UDPServer\Program.cs
     文件        3764  2009-02-11 08:38  sj\01\UDPChat\UDPServer\UDPServer.csproj
     文件        8192  2009-02-11 08:38  sj\01\UDPChat\UDPServer\bin\Debug\UDPServer.exe
     文件       22016  2009-02-11 08:38  sj\01\UDPChat\UDPServer\bin\Debug\UDPServer.pdb
     文件       14328  2009-02-11 08:38  sj\01\UDPChat\UDPServer\bin\Debug\UDPServer.vshost.exe
     文件         730  2009-02-11 08:38  sj\01\UDPChat\UDPServer\obj\Debug\UDPServer.csproj.FileListAbsolute.txt
     文件         847  2009-02-11 08:38  sj\01\UDPChat\UDPServer\obj\Debug\UDPServer.csproj.GenerateResource.Cache
............此处省略71个文件信息

评论

共有 条评论