🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #5704

Re: Forcing Transmission of Packets

#5704
From: Remy Lebeau (TeamB)
Date: Fri, 09 Jul 2004 23:15
34 lines
2539 bytes
"Joe St. Onge" <jstonge@nel-techlabs.com> wrote in message
news:40eee74d$1@newsgroups.borland.com...

> Anyone know how to change the BB TServe Socket operation
> to force it to transmit smaller packets instead of the 1K???

Try disabling the Nagle algorithm so that data is send immediately instead
of being buffered.  Use the Win32 API setsockopt() function directly,
specifying the TCP_NODELAY operation:

    level = IPPROTO_TCP
    value: TCP_NODELAY
    type: BOOL
    meaning: Disables the Nagle algorithm for send coalescing.

    The TCP_NODELAY option is specific to TCP/IP service providers. Enabling
the TCP_NODELAY option disables the TCP Nagle Algorithm (and vice versa).
The Nagle algorithm (described in RFC 896) is very effective in reducing the
number of small packets sent by a host by essentially buffering send data if
there is unacknowledged data already "in flight" or until a full-size packet
can be sent. It is highly recommended that TCP/IP service providers enable
the Nagle Algorithm by default, and for the vast majority of application
protocols the Nagle Algorithm can deliver significant performance
enhancements. However, for some applications this algorithm can impede
performance, and TCP_NODELAY can be used to turn it off. These are
applications where many small messages are sent, which need to be received
by the peer with the time delays between the messages maintained.
Application writers should not set TCP_NODELAY unless the impact of doing so
is well-understood and desired, since setting TCP_NODELAY can have a
significant negative impact of network and application performance.


Gambit
Technical Details
Message-ID: <40ef26e6$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <40eee74d$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,a9487aba9f7a346f
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <40eee74d$1@newsgroups.borland.com>
Subject: Re: Forcing Transmission of Packets
Date: Fri, 9 Jul 2004 16:15:19 -0700
Lines: 36
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.10
Message-ID: <40ef26e6$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1089414886 68.69.17.10 (9 Jul 2004 16:14:46 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail