资源介绍
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace SocketClient
{
public partial class SocketClient : Form
{
public delegate void UpdateReceiveMsgCallback(string msg);//定义委托变量
byte[] dataBuffer = new byte[10];//定义一个byte类型数组
IAsyncResult result;
public AsyncCallback pfnCallBack;
public Socket clientSocket;
//构造函数
public SocketClient()
{
InitializeComponent();
//初始化
tb_ServerIP.Text = InitializeInfo();
tb_ServerPort.Text = "8000";
}
- 上一篇: C#udp客户端和服务端通信
- 下一篇: C#获得客户端MAC ip