91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

服務(wù)器客戶端UDP廣播通話


【核心代碼】

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Net.Sockets;
using System.Net;
namespace NetServer
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            //使用UDP協(xié)議發(fā)送數(shù)據(jù)
            Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
            //設(shè)置端口號
            IPEndPoint ieps = new IPEndPoint(IPAddress.Broadcast, 8900);
            socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Broadcast, 1);
            //將發(fā)送數(shù)據(jù)轉(zhuǎn)換為字節(jié)數(shù)組
            byte[] bytess = System.Text.Encoding.Unicode.GetBytes(textBox1.Text);
            socket.SendTo(bytess, ieps);
            socket.Close();
        }
    }
}

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.Linq;
using?System.Text;
using?System.Windows.Forms;
using?System.Net;
using?System.Net.Sockets;
using?System.Threading;

namespace?NetClient
{
????public?class?AddMessageEventArgs?:?EventArgs
????{
????????public?string?mess;
????}

???public?class?ClassListener
????{
????????private?Thread?ths;
????????private?EndPoint?eps;
????????private?string?receiveDatas;
????????private?Socket?socket;
????????public?event?EventHandler?OnAddMessAge;
????????public?ClassListener()?{?}
????????//開始監(jiān)聽
????????public?void?StartListen()
????????{
????????????ths?=?new?Thread(new?ThreadStart(Listen));
????????????ths.Start();
????????}
????????//停止監(jiān)聽
????????public?void?Stop()
????????{
?????

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----

?????文件??????11264??2020-05-26?20:30??NetClient\NetClient\bin\Debug\NetClient.exe

?????文件??????38400??2020-05-26?20:30??NetClient\NetClient\bin\Debug\NetClient.pdb

?????文件??????21464??2020-05-27?10:41??NetClient\NetClient\bin\Debug\NetClient.vshost.exe

?????文件????????490??2012-06-06?02:06??NetClient\NetClient\bin\Debug\NetClient.vshost.exe.manifest

?????文件???????1846??2009-09-18?12:39??NetClient\NetClient\ClassListener.cs

?????文件???????1933??2009-10-08?12:01??NetClient\NetClient\Form1.cs

?????文件???????4040??2009-09-18?20:20??NetClient\NetClient\Form1.Designer.cs

?????文件???????6690??2009-09-18?20:20??NetClient\NetClient\Form1.resx

?????文件???????3962??2020-05-26?20:27??NetClient\NetClient\NetClient.csproj

?????文件???????6801??2020-05-26?20:30??NetClient\NetClient\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

?????文件???????2467??2020-05-27?10:41??NetClient\NetClient\obj\Debug\NetClient.csproj.FileListAbsolute.txt

?????文件????????847??2020-05-26?20:30??NetClient\NetClient\obj\Debug\NetClient.csproj.GenerateResource.Cache

?????文件??????11264??2020-05-26?20:30??NetClient\NetClient\obj\Debug\NetClient.exe

?????文件????????180??2020-05-26?20:30??NetClient\NetClient\obj\Debug\NetClient.Form1.resources

?????文件??????38400??2020-05-26?20:30??NetClient\NetClient\obj\Debug\NetClient.pdb

?????文件????????180??2020-05-26?20:30??NetClient\NetClient\obj\Debug\NetClient.Properties.Resources.resources

?????文件???????4608??2020-05-26?20:30??NetClient\NetClient\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll

?????文件????????490??2009-09-18?12:15??NetClient\NetClient\Program.cs

?????文件???????1350??2009-09-18?12:15??NetClient\NetClient\Properties\AssemblyInfo.cs

?????文件???????2858??2020-05-26?20:27??NetClient\NetClient\Properties\Resources.Designer.cs

?????文件???????5612??2009-09-18?12:15??NetClient\NetClient\Properties\Resources.resx

?????文件???????1109??2020-05-26?20:27??NetClient\NetClient\Properties\Settings.Designer.cs

?????文件????????249??2009-09-18?12:15??NetClient\NetClient\Properties\Settings.settings

?????文件????????917??2020-05-26?20:27??NetClient\NetClient.sln

????..A..H.?????17408??2009-10-08?12:02??NetClient\NetClient.suo

????..A..H.?????40448??2020-05-27?10:43??NetClient\NetClient.v11.suo

?????文件???????9216??2020-05-26?20:29??NetServer\NetServer\bin\Debug\NetServer.exe

?????文件??????32256??2020-05-26?20:29??NetServer\NetServer\bin\Debug\NetServer.pdb

?????文件??????21464??2020-05-27?10:38??NetServer\NetServer\bin\Debug\NetServer.vshost.exe

?????文件????????490??2012-06-06?02:06??NetServer\NetServer\bin\Debug\NetServer.vshost.exe.manifest

............此處省略42個文件信息

評論

共有 條評論