summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorArtyom V. Poptsov <poptsov.artyom@gmail.com>2015-12-05 20:07:41 +0300
committerArtyom V. Poptsov <poptsov.artyom@gmail.com>2015-12-05 20:07:41 +0300
commite477fc5cd7b95cbde4e1ec25f58eb2754ce0f404 (patch)
tree55598f81372b1762acd0228db6e9f954e3e1b6dd /doc
parentchannel.scm (open-remote-pipe): Handle errors (diff)
downloadguile-ssh-e477fc5cd7b95cbde4e1ec25f58eb2754ce0f404.tar.gz
channel.scm (make-channel): Accept optional flags
* modules/ssh/channel.scm (make-channel): Accept optional flags that allow to create an input, output or input/output channel. The procedure creates a bidirectional tunnel by default. * libguile-ssh/channel-type.c (guile_ssh_make_channel): Likewise. Rename the Scheme procedure to '%make-channel'. All callers updated. (_scm_from_channel_data): Accept flags. Assert flags value. (print_channel): Print the direction of a channel. (init_channel_type): Define 'RDNG' and 'WRTNG' symbols. * libguile-ssh/channel-type.h: Update. * libguile-ssh/message-func.c (guile_ssh_message_channel_request_open_reply_accept): Update. * doc/api-channels.texi: Update description of 'make-channel'.
Diffstat (limited to 'doc')
-rw-r--r--doc/api-channels.texi10
1 files changed, 7 insertions, 3 deletions
diff --git a/doc/api-channels.texi b/doc/api-channels.texi
index 6123027..03c5b7b 100644
--- a/doc/api-channels.texi
+++ b/doc/api-channels.texi
@@ -33,9 +33,13 @@ Return @code{#t} if @var{x} is a Guile-SSH channel, @code{#f}
otherwise.
@end deffn
-@deffn {Scheme Procedure} make-channel session
-Allocate a new Guile-SSH channel for the @var{session}
-(@pxref{Sessions}).
+@deffn {Scheme Procedure} make-channel session [flags]
+Allocate a new Guile-SSH channel for the @var{session} (@pxref{Sessions}).
+
+@var{flags} are determine what kind of a channel should be created. Possible
+flags are: @code{O_RDONLY}, @code{O_WRONLY}, @code{O_RDWR}. They play similar
+role to @code{open} procedure flags, and allow to create an ihput channel,
+output channel or input/output channel respectively.
@end deffn
@deffn {Scheme Procedure} channel-open-session channel