From 554605ee04946160e360354c4aee9102c877ac19 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Fri, 4 Jul 2003 16:27:36 +0000 Subject: 18810: Various enhancements and bug fixes for the TCP function suite --- Doc/Zsh/tcpsys.yo | 126 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 105 insertions(+), 21 deletions(-) (limited to 'Doc') diff --git a/Doc/Zsh/tcpsys.yo b/Doc/Zsh/tcpsys.yo index 2875b8981..1b52b4f4b 100644 --- a/Doc/Zsh/tcpsys.yo +++ b/Doc/Zsh/tcpsys.yo @@ -353,7 +353,7 @@ The command is run in the background, so tt(tcp_proxy) can then accept new connections. It continues to accept new connections until interrupted. ) findex(tcp_spam) -item(tt(tcp_spam [-rtv] [ -a | -s ) var(sess) tt(| -l) var(sess)tt(,... ]) var(cmd) tt(...))( +item(tt(tcp_spam [-ertv] [ -a | -s ) var(sess) tt(| -l) var(sess)tt(,... ]) var(cmd) tt(...))( Execute `var(cmd) tt(...)' for each session in turn. Note this executes the command and arguments; it does not send the command line as data unless the tt(-t) (transmit) option is given. @@ -374,6 +374,9 @@ The tt(-v) flag specifies that a tt($TCP_PROMPT) will be output before each session. This is output after any modification to TCP_SESS by the user-defined tt(tcp_on_spam) function described below. (Obviously that function is able to generate its own output.) + +If the option tt(-e) is present, the line given as var(cmd ...) is executed +using tt(eval), otherwise it is executed without any further processing. ) findex(tcp_talk) item(tt(tcp_talk))( @@ -403,7 +406,33 @@ installed. ) enditem() -sect(TCP User-defined Function) +subsect(`One-shot' file transfer) +startitem() +xitem(tt(tcp_point) var(port)) +item(tt(tcp_shoot) var(host) var(port))( +This pair of functions provide a simple way to transfer a file between +two hosts within the shell. Note, however, that bulk data transfer is +currently done using tt(cat). tt(tcp_point) reads any data arriving at +var(port) and sends it to standard output; tt(tcp_shoot) connects to +var(port) on var(host) and sends its standard input. Any unused var(port) +may be used; the standard mechanism for picking a port is to think of a +random four-digit number above 1024 until one works. + +To transfer a file from host tt(woodcock) to host tt(springes), on +tt(springes): + +example(tcp_point 8091 >output_file) + +and on tt(woodcock): + +example(tcp_shoot springes 8091