Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Aug : Re: How to disable nagle in TIdTPCClient and TIdTCPServer

www.cryer.info
Managed Newsgroup Archive

Re: How to disable nagle in TIdTPCClient and TIdTCPServer

Subject:Re: How to disable nagle in TIdTPCClient and TIdTCPServer
Posted by:"Luca Bottani" (in..@noxed.com)
Date:Tue, 22 Aug 2006 12:27:03

Hello Theo,

thank you for your support and links, anyway I need it only
for testing.

I saw the UseNagle property , but I am really new to
the Indy Library, so a few lines of code would be very appreciate:

I tried with these for the client part, but I am not sure that is the
correct way:

[declaration...]
IdTCPClient            : TIdTCPClient;
IOHandler               : TIdIOHandlerSocket;

  //TDataTCPClient
  constructor TDataTCPClient.Create(OnNewDataPacketExtract:
TOnNewDataPacketExtract);
  begin
    DataReadTCPClient  := nil;
    CriticalSection  := TCriticalSection.Create();
    IdTCPClient := TIdTCPClient.Create(nil);
    IOHandler := TIdIOHandlerSocket.Create(IdTCPClient);
    IOHandler.UseNagle := False;
    IdTCPClient.IOHandler := IOHandler;
    [...]
end;

I did not understand how to do the same in the server part, is it enough to
set
in a connect event ?

ie:     AThread.Connection.Socket.UseNagle := False;

Could you help me?

Thank you,
Luca

---

> Afaik it's the UseNagle property of TIdIOHandlerSocket.
>
> But you should read a bit before deciding whether you really want to do
> this:
>
> http://support.microsoft.com/kb/214397/EN-US/
>
>
http://groups.google.com/group/comp.os.ms-windows.networking.tcp-ip/browse_thread/thread/73a34d2e3ea3dcc/3dd07ea544d34be9

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive