S
serenaiad
Unregistered / Unconfirmed
GUEST, unregistred user!
var FilStm:TFileStream;
Buf:array[0..2000] of char;
begin
While ( Not self.ClientSocket.WaitForData(30000)) do //这一行老出错,大家给看看
Begin
self.ClientSocket.ReceiveBuf(buf,2000);
ShowMessage(buf);
FilStm:=TFileStream.Create('c:/csdn.xml',fmOpenRead);
self.ClientSocket.Sendln('HTTP/1.1 200 OK'+#13#10+'Contetn-Type: text/xml'+#13#10);
Self.ClientSocket.SendStream(FilStm);
FilStm.Free;
End;
{ Place thread code here }
end;
Buf:array[0..2000] of char;
begin
While ( Not self.ClientSocket.WaitForData(30000)) do //这一行老出错,大家给看看
Begin
self.ClientSocket.ReceiveBuf(buf,2000);
ShowMessage(buf);
FilStm:=TFileStream.Create('c:/csdn.xml',fmOpenRead);
self.ClientSocket.Sendln('HTTP/1.1 200 OK'+#13#10+'Contetn-Type: text/xml'+#13#10);
Self.ClientSocket.SendStream(FilStm);
FilStm.Free;
End;
{ Place thread code here }
end;