就是clientsocket
Var
f:File;
procedure TForm1.btnLinkClick(Sender: TObject);
begin
AssignFile(f,'out.txt');
Rewrite(F,1);
Memo.Lines.Clear;
ClientSocket.Open;
end;
procedure TForm1.btnSendClick(Sender: TObject);
begin
ClientSocket.Socket.SendText('GET /'+Edit.Text+#$0A);
end;
procedure TForm1.ClientSocketRead(Sender: TObject;
Socket: TCustomWinSocket);
Var
s:String;
begin
If Socket.Connected Then
Begin
s:=Socket.ReceiveText;
Memo.Lines.Add(s);
BlockWrite(F,s[1],Length(s));
End;
end;
procedure TForm1.ClientSocketConnect(Sender: TObject;
Socket: TCustomWinSocket);
begin
Memo.Lines.Add('AAAAAConn');
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
ClientSocket.Close;
CloseFile(f);
end;