diff options
| author | Artyom V. Poptsov <poptsov.artyom@gmail.com> | 2016-10-30 12:36:04 +0400 |
|---|---|---|
| committer | Artyom V. Poptsov <poptsov.artyom@gmail.com> | 2016-10-30 12:36:04 +0400 |
| commit | ef80c1f70453b6e52124a1f47b0aeef72e7a48c1 (patch) | |
| tree | 07a4610261d06c1715544c35418c9ffbf1f57974 /doc | |
| parent | NEWS: Bump version to 0.10.1 (diff) | |
| download | guile-ssh-ef80c1f70453b6e52124a1f47b0aeef72e7a48c1.tar.gz | |
channel.scm (channel-send-eof!): New procedure
* modules/ssh/channel.scm (channel-send-eof!): New procedure.
* libguile-ssh/channel-func.c (gssh_channel_send_eof_x): New procedure.
* doc/api-channels.texi: Add description of 'channel-send-eof!'.
* tests/client-server.scm ("channel-send-eof!"): New TC.
* doc/version.texi, NEWS: Update.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/api-channels.texi | 42 | ||||
| -rw-r--r-- | doc/version.texi | 5 |
2 files changed, 47 insertions, 0 deletions
diff --git a/doc/api-channels.texi b/doc/api-channels.texi index 827a343..e3231b0 100644 --- a/doc/api-channels.texi +++ b/doc/api-channels.texi @@ -132,6 +132,48 @@ Get the session to which belongs the @var{channel}. Throw @code{guile-ssh-error} on an error. Return the session. @end deffn +@deffn {Scheme Procedure} channel-send-eof! channel +Send an end of file (EOF) on the @var{channel}. This action doesn't close the +@var{channel}; you may still read from it but not write. Throw +@code{guile-ssh-error} on an error. Return value is undefined. + +Example: + +@lisp +(use-modules (ice-9 rdelim) + ;; Guile-SSH modules. + (ssh auth) + (ssh popen) + (ssh session) + (ssh channel)) + +;; Make a session +(define s (make-session #:host "example.org")) + +;; Connect to the server +(connect! s) + +;; Authenticate +(userauth-agent! s) + +;; Open a remote pipe to 'wc' command running on +;; the server. +(let ((p (open-remote-pipe s "wc" OPEN_BOTH))) + + ;; Send data to 'wc' command using the remote pipe. + (display "Hello Scheme World!" p) + + ;; 'wc' reads data until EOF and writes its result + ;; afterwards. + (channel-send-eof! p) + + ;; Read the 'wc' output. + (read-line p)) +@result{} " 0 3 19" +@end lisp + +@end deffn + @deffn {Scheme Procedure} channel-eof? channel Return @code{#t} if remote has sent @acronym{EOF}, @code{#f} otherwise. Throw @code{guile-ssh-error} if the channel has been closed and freed. diff --git a/doc/version.texi b/doc/version.texi index cc70a06..e2494e1 100644 --- a/doc/version.texi +++ b/doc/version.texi @@ -1,4 +1,9 @@ @set UPDATED 9 October 2016 @set UPDATED-MONTH October 2016 +<<<<<<< Updated upstream @set EDITION 0.10.1 @set VERSION 0.10.1 +======= +@set EDITION 0.10.0 +@set VERSION 0.10.0 +>>>>>>> Stashed changes |
