Patch to avoid 'Connection reset by peer' error for rsync on cygwin

Jos Backus jos at catnook.com
Fri Apr 26 09:57:02 EST 2002


On Fri, Apr 26, 2002 at 05:40:07PM +0100, Max Bowsher wrote:
> Action of the function depends on the value of howto -
> SHUT_RD - read half of the connection is closed. The data currently in the
> socket receive buffer is discarded.
> SHUT_WR - write half of the connection is closed. The data in the socket send
> buffer is sent followed by the normal TCP connection termination sequence.
> SHUT_RDWR - both read and write halves of the connection are closed.

Slightly off-topic (sorry) but interesting perhaps: had socket() been designed
to return an int[2] (like pipe() and socketpair()), shutdown() would not have
been necessary and one could have just used close() on each descriptor
instead.

-- 
Jos Backus                 _/  _/_/_/        Santa Clara, CA
                          _/  _/   _/
                         _/  _/_/_/             
                    _/  _/  _/    _/
jos at catnook.com     _/_/   _/_/_/            use Std::Disclaimer;




More information about the rsync mailing list