Delphi Indy Client线程模式,客户端发送消息接受消息
提示:客户端设置
核心源代码
提示:TMyThread线程接受和发送
type
TForm1 = class(TForm)
GroupBox1: TGroupBox;
Label1: TLabel;
Label2: TLabel;
Memo1: TMemo;
Edit1: TEdit;
Button1: TButton;
Button2: TButton;
Edit2: TEdit;
Button3: TButton;
IdTCPClient1: TIdTCPClient;
procedure Button1Click(Sender: TObject);
procedure IdTCPServer1Execute(AContext: TIdContext);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure IdTCPServer1Connect(AContext: TIdContext);
procedure IdTCPServer1Disco