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";
}
1