On 2018/06/14 13:40, sven falempin wrote:
> Dear Tech Readers,
> 
> In ftp command -w is available, very useful for crappy networks.
> pkg_add does not have any of this.
> 
> The HTTP layer is not configuring Timeout.
> ( in /usr/libdata/perl5/OpenBSD/./PackageRepository/HTTP.pm )
>         my $o = IO::Socket::INET->new(
>                 PeerHost => $host,
>                 PeerPort => $port);
> ( plenty of option here like MultiHomed or Timeout, ReuseAddr, blocking )
> 
> Nor using an nonblocking Read later
> 
> sub get_header
> {
>         my $o = shift;
>         my $l = $o->getline;
>         if ($l !~ m,^HTTP/1\.1\s+(\d\d\d),) {
> 
> Most usage may be used in FTP so none notice so far.
> 
> SCP and FTP are done with the actual binary, ftp handle http well and
> is ready to get an option for crappy network.
> 
> Maybe a patch can add a '-w' to pkg_add and push it there :
> 
> sub ftp_cmd
> {
>         my $self = shift;
>         return $self->SUPER::ftp_cmd." -S 
> session=/dev/fd/".fileno($self->{fh});
> }
> 
> And use this for all transfer ?
> 
> Or is the user supposed to manage this out of the pkg_add tool.
> 
> I can propose a patch if not *
> 
> Best.
> 
> -- 
> --
> ---------------------------------------------------------------------------------------------------------------------
> Knowing is not enough; we must apply. Willing is not enough; we must do
> 

I don't think it makes a lot of sense, if you know you're on a crappy network
that drops connection requests and would prefer to see failures quickly rather
than give it a better chance of actually connecting, you can just set
sysctl net.inet.tcp.keepinittime (the value is in half-seconds).

Reply via email to