Re: PERL - TCP_NODELAY - How to set ?

[email protected] (Jan Pieter Cornet) Mon, 28 Apr 2003 00:26:46 +0200
Newsgroups perl.libnet
Message-ID <[email protected]>
On Sat, Apr 26, 2003 at 12:38:43AM -0700, RAJASHEKHAR Y wrote:
> TCP_NODELAY problem in PERL
> 
> When we are connecting to one server (as a client) our
> first message is properly received by the server and
> all the messages from the server are received by us
> but our second message and subsequent messages are not
> received at the server end due to TCP_NODELAY problem.
> How to set this TCP_NODELAY to avoid this problem ?

Er, a few points...

First, TCP_NODELAY should only be set (using setsockopt, see "man setsockopt",
"man tcp", and "perldoc -f setsockopt") when you have very fine timing
demands. TCP_NODELAY settings should never cause a message to be lost
(but it might receive a fraction of a second later than with
TCP_NODELAY set). So, TCP_NODELAY is likely not the problem here.

Second, including a short fragment of code that illustrates the problem
would be helpful.

Third, why are you Cc:ing this to me? Are you under the (wrongful) impression
that I'm an authority on TCP_NODELAY?

-- 
#!perl -pl	# This kenny-filter is virus-free as long as you don't copy it
$p=3-2*/[^\W\dmpf_]/i;s.[a-z]{$p}.vec($f=join('',$p-1?chr(sub{$_[0]*9+$_[1]*3+
$_[2]}->(map{/p|f/i+/f/i}split//,$&)+97):('m',p,f)[map{((ord$&)%32-1)/$_%3}(9,
3,1)]),5,1)='`'lt$&;$f.eig;				   # Jan-Pieter Cornet