🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.internet.socket
4 messages
4 total messages Started by didier Tue, 30 May 2006 15:14
UseNagle with ClientSocket on BC++6.0
#2373
Author: didier
Date: Tue, 30 May 2006 15:14
8 lines
1177 bytes
Hi,

I am using the ClienSocket VCL component of Borland C++6.0.
How do I access and set the UseNagle option to [false] for the associated socket ? (required for me to avoid concatenation of packets, 
On Visual C++ 2005, there is a function called setsockopt() which does this stuff. 
On Borland C++ 6.0, there is a Nagle property in TIdTCPClient component, but ClientSocket comes from a TClientSocketThread component. 
Any idea ?
Re: UseNagle with ClientSocket on BC++6.0
#2374
Author: Bob Gonder
Date: Tue, 30 May 2006 16:38
7 lines
1386 bytes
didier wrote:

>On Visual C++ 2005, there is a function called setsockopt() which does this stuff. 
>On Borland C++ 6.0, there is a Nagle property in TIdTCPClient component, but ClientSocket comes from a TClientSocketThread component. 

Google is your friend. Searched for NAGLE BORLAND
http://groups.google.com/group/borland.public.cppbuilder.internet.socket/browse_thread/thread/a9487aba9f7a346f/cd1282c2adab7ad9?lnk=st&q=Nagle+borland&rnum=10#cd1282c2adab7ad9
Re: UseNagle with ClientSocket on BC++6.0
#2375
Author: Remy Lebeau (TeamB)
Date: Tue, 30 May 2006 16:41
25 lines
1617 bytes
"didier" <jehanno@lal.in2p3.fr> wrote in message
news:447c6145$1@newsgroups.borland.com...

> How do I access and set the UseNagle option to [false] for
> the associated socket ?

You have to use the setsockopt() function from the WinSock API directly.
For example:

    void __fastcall TForm1::ClientSocket1Connect(TObject *Sender,
TCustomWinSocket *Socket)
    {
        BOOL disabled = TRUE;
        setsockopt((SOCKET)Socket->SocketHandle, IPPROTO_TCP, TCP_NODELAY,
(char*)&disabled, sizeof(BOOL));
    }

> On Visual C++ 2005, there is a function called setsockopt() which does
this stuff.

That is an API function.  It is available to Borland compilers as well.


Gambit
Re: UseNagle with ClientSocket on BC++6.0
#2276
Author: didier
Date: Wed, 31 May 2006 13:51
5 lines
892 bytes
Thanks Bob & Remy,
it works fine !

Didier
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads