cURL / Mailing Lists / curl-library / Single Mail


Actually testing the non-blocking code is all of libcurl

From: James Housley <>
Date: Thu, 14 Jun 2007 10:33:55 -0400

While adding the libssh2 non-blocking code to libcurl several times I
ran into a problem. Running the 6xx tests worked without a problem,
but I would get failures while testing between 2 machines. While
developing these changes to libssh2 I would test to a computer on the
local network running FreeBSD with ipfw/dummynet to limit the
bandwidth to 2500 bits/s. I think it would be good to run some of
the tests for each protocol through the same conditions, doing all of
them would be crazy.

What is rolling around in my head right now is a very simple proxy
program that would delay packets. The command link might look like

proxydelay <4|6> <listen port> <connect port> <delay time>

Where using ipv4 or ipv6 would start listening on localhost TCP port
<listen port> for a connection. Once a connection is made it would
then connect to localhost TCP port <connect port> . Once that is
done it would start listening for data. When it received a packet on
either the "listen" side or "connect" side the program would then
delay <delay time> ms before sending it out the other side.

Using the for both FTP streams would be tricky, but may still be able
to be done.

This probably won't be able to trigger blocking on write by libcurl,
but will produce blocking on read.


/"\   ASCII Ribbon Campaign  .
\ / - NO HTML/RTF in e-mail  .
  X  - NO Word docs in e-mail .
/ \ -----------------------------------------------------------------
                 The Power to Serve
Do not meddle in the affairs of dragons, for you are crunchy and taste
     good with ketchup.
Received on 2007-06-14