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;
//UDP通过广播实现群发功能
namespace BroadcastExample
{
public partial class Form1 : Form
{
delegate void AppendStringCallback(string text);
AppendStringCallback appendstringcallback;
//使用的接收端口 51008
/// <summary>
/// 端口号
/// </summary>
private int port = 51008;
/// <summary>
/// udp连接对象
/// </summary>
private UdpClient udpclient;
public Form1()
{
InitializeComponent();
appendstringcallback = new AppendString