public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Ken Brown <kbrown@cornell.edu>
To: cygwin@cygwin.com
Subject: Re: TCP_KEEPINVTL and TCP_KEEPIDLE - Socket Keep Alives not working
Date: Sun, 7 Jun 2020 14:19:40 -0400	[thread overview]
Message-ID: <ba71f855-276d-9d45-5c78-6d0a91dc57dd@cornell.edu> (raw)
In-Reply-To: <CAEF1h+WHsGXzSykQ0G3aXG=8jY5VmpYQQiYNP7DjHJTS1Bkpsw@mail.gmail.com>

On 6/7/2020 9:20 AM, Cary Lewis via Cygwin wrote:
> These constants are usually defined in  netinet/tcp.h but are not defined
> anywhere in cygwin.
 >
> As a result there does not seem to be a way to enable the socket level keep
> alives in cygwin.
> 
> One result of this is curl's --keepalive-time option does not work, but it
> would affect any attempt to enable socket keep alives.
> 
> Windows' sockets do support keep alives, and indeed the win32 version of
> curl works correctly.
> 
> Can someone explain why the TCP keep alive constants are not defined

I'm not an expert on sockets, but I'll just make a couple of comments until 
Corinna has a chance to give a definitive reply.

Cygwin's netinet/tcp.h was derived from the FreeBSD version of the file dated 
2000/01/09.  It has hardly been touched since it was imported into Cygwin in 
2002.  FreeBSD didn't add keepalive support until 2012.

> Is it possible to add this functionality?

If you're asking someone else to do it, the question is whether one of the 
Cygwin developers has the time and expertise to do it.  If you're volunteering 
to do it, patches are always welcome.

> Where in the cygwin source code does the actual posix socket to winsock
> translation take place?

Cygwin's socket support is in the fhandler_socket* files.

Ken

  reply	other threads:[~2020-06-07 18:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-07 13:20 Cary Lewis
2020-06-07 18:19 ` Ken Brown [this message]
2020-06-07 18:56   ` Cary Lewis
2020-06-30 11:12     ` Corinna Vinschen
2020-06-30 13:46       ` Cary Lewis
2020-06-30 16:53         ` Corinna Vinschen
2020-07-01 19:50           ` Corinna Vinschen
2020-07-02 14:52             ` Cary Lewis
2020-07-13 13:05               ` Cary Lewis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ba71f855-276d-9d45-5c78-6d0a91dc57dd@cornell.edu \
    --to=kbrown@cornell.edu \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).