Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Jun : Telnet error
| Subject: | Telnet error |
| Posted by: | "Ferenc Nemeth" (ferenc.neme..@interticket.hu) |
| Date: | Wed, 28 Jun 2006 17:05:16 |
Hi,
I have a previous post, about an error with telnet. After sending a
telnet command, sometime only a part of the response comes back. (first
2-5 lines). It works differently on different PCs.
If you have an error seems like this then you should edit the
IdTCPServer unit,
function TIdCommandHandler.Check...
there is a part like this:
if Response.Count > 0 then begin
AThread.Connection.WriteRFCStrings(Response);
end else if CommandHandler.Response.Count > 0 then begin
AThread.Connection.WriteRFCStrings(CommandHandler.Response);
end;
you should change it to:
if Response.Count > 0 then begin
AThread.Connection.OpenWriteBuffer;
try
AThread.Connection.WriteRFCStrings(Response);
finally
AThread.Connection.CloseWriteBuffer;
end;
end else if CommandHandler.Response.Count > 0 then begin
AThread.Connection.OpenWriteBuffer;
try
AThread.Connection.WriteRFCStrings(CommandHandler.Response);
finally
AThread.Connection.CloseWriteBuffer;
end;
end;
best regards
Feri