using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Net;
using System.Net.Sockets;
using System.Threading;
namespace _008_局域网聊天室
{
public partial class Form1 : Form
{
//--tcplistener
private TcpListener myTcpListener;
//--创建接收客户端连接线程
private Thread AcceptClientThread;
//--
private Dictionary<string, Socket> ClientSocketDic;
//--
private TcpClient tcpClient;
//--
private delegate void ReceiveClientCallBack(string endPoint);
private ReceiveClientCallBack receiveClientCallBack;
//-删除客户端回调
private delegate void DeleteClientCallBack(int index);
private DeleteClientCallBack deleteClientCallBack;
//---添加消息回调
private delegate void ShowMessageCall
代码篇C#网络编程之局域网聊天
最新推荐文章于 2024-06-11 23:05:41 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)