counting the number of connections?

3 messages, 3 authors, 2016-06-15 · open the first message on its own page

counting the number of connections?

From: Tay Ray Chuan <hidden>
Date: 2016-06-15 22:46:18

Hi,

some time ago I noticed curl doesn't remember your credentials (apart
from those it can get from ~/.netrc), and very recently there was an
thread on repeated prompting for credentials while pushing to https.

I've written a simple patch series, which allows git to play nice
without curl_multi. That is, git uses a single persistent connection
throughout.

However, I'm at a loss at how to test for this. How does one count the
number of connections made during the lifespan of a program's
execution? So far, I've been relying on my firewall log (Comodo on
windows). Perhaps there a more operating system/software-agnostic
method to do this?

-- 
Cheers,
Ray Chuan

Re: counting the number of connections?

From: David Kågedal <hidden>
Date: 2016-06-15 22:46:20

Tay Ray Chuan [off-list ref] writes:
Hi,

some time ago I noticed curl doesn't remember your credentials (apart
from those it can get from ~/.netrc), and very recently there was an
thread on repeated prompting for credentials while pushing to https.

I've written a simple patch series, which allows git to play nice
without curl_multi. That is, git uses a single persistent connection
throughout.

However, I'm at a loss at how to test for this. How does one count the
number of connections made during the lifespan of a program's
execution? So far, I've been relying on my firewall log (Comodo on
windows). Perhaps there a more operating system/software-agnostic
method to do this?
You could set up a single-use tcp forwarder which will make any second
connection fail. Using socat, for instance:

  $ socat tcp-listen:2222,bind=localhost tcp:my.server:22 &
  $ nc localhost 2222
  SSH-2.0-OpenSSH_5.1p1 Debian-3ubuntu1
  ^C
  $ nc localhost 2222
  localhost [127.0.0.1] 2222 (?) : Connection refused

-- 
David Kågedal

Re: counting the number of connections?

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:46:20

Hi,

On Thu, 5 Mar 2009, David Kågedal wrote:
Tay Ray Chuan [off-list ref] writes:
quoted
some time ago I noticed curl doesn't remember your credentials (apart 
from those it can get from ~/.netrc), and very recently there was an 
thread on repeated prompting for credentials while pushing to https.

I've written a simple patch series, which allows git to play nice
without curl_multi. That is, git uses a single persistent connection
throughout.

However, I'm at a loss at how to test for this. How does one count the
number of connections made during the lifespan of a program's
execution? So far, I've been relying on my firewall log (Comodo on
windows). Perhaps there a more operating system/software-agnostic
method to do this?
You could set up a single-use tcp forwarder which will make any second
connection fail. Using socat, for instance:

  $ socat tcp-listen:2222,bind=localhost tcp:my.server:22 &
  $ nc localhost 2222
  SSH-2.0-OpenSSH_5.1p1 Debian-3ubuntu1
  ^C
  $ nc localhost 2222
  localhost [127.0.0.1] 2222 (?) : Connection refused
AFAICT Ray wants to provide tests for Git's test suite, and introducing 
socat as a dependency for our tests does not really fly all that well.

But IIRC somebody convinced Ray that it is better to require a new-enough 
cURL version so that the patch becomes moot itself.

Ciao,
Dscho
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help