unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Connection drops data if it sent too quickly
@ 2003-02-03 20:37 Kai Großjohann
  2003-02-04 10:49 ` Michael Albinus
  2003-02-04 15:42 ` Richard Stallman
  0 siblings, 2 replies; 9+ messages in thread
From: Kai Großjohann @ 2003-02-03 20:37 UTC (permalink / raw)


Tramp calls, say, ssh via start-process.  This results in an
interactive shell from the remote host.  Then Tramp sends commands to
this shell.  For example, it might send:

    mimencode -u -b <<'EOF'

Then Tramp uses process-send-region to send base64 encoded data to
this ssh process.  Then Tramp sends the string EOF.

The problem is that the connection is dropping bytes when the data is
sent too quickly.  I've changed it to send chunks of 500 bytes, then
wait 0.1 seconds.  This works.

This happens using for Michael, a codeveloper, using GNU Emacs 20.7.1
(hppa1.1-hp-hpux10.20, Motif) to connect to localhost.  The file in
question is between 300k and 400k (so the base64 encoded data is
correspondingly bigger).  It also happens to other people, but I don't
have a reference.  The remote end only sees 150 bytes (!) or so of it.
Removing the (sleep-for 0.1) but keeping the send-in-chunks mechanism
lets 250k (or so) arrive on the remote end.

There seems to be code in process-send-region (or a function called
from it) that tries to avoid sending data too quickly, but I don't
grok it.

Just unconditionally throttling the speed of data transmission seems
kludgy.  But what to do?

(Maybe Michael could try what happens when he does

  mimencode -b /tmp/largefile | \
    ssh jrl@localhost /bin/sh -c 'mimencode -u -b > /tmp/outfile'

outside of Emacs.  Maybe the problem is in ssh.  But nevertheless,
Tramp needs to work around it.)

Thanks for any advice.
-- 
A turnip curses Elvis

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-02-07 23:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-03 20:37 Connection drops data if it sent too quickly Kai Großjohann
2003-02-04 10:49 ` Michael Albinus
2003-02-04 15:42 ` Richard Stallman
2003-02-05 15:24   ` Michael Albinus
2003-02-05 23:31     ` Kim F. Storm
2003-02-06  7:45       ` Michael Albinus
2003-02-07 18:31         ` Kai Großjohann
2003-02-07 23:10       ` Richard Stallman
2003-02-06 15:40     ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).