From edbbc40fc3e4d5698408e109ac6f9fd301aae05f Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Mon, 5 Aug 2019 12:41:17 +0200 Subject: ssh: Update ssh_sftp:start_channel documentation and code The Typing in the old documentation was not up-to-date. The option handling and definition is slightly re-worked in the code also. Some comments added and a function moved inside the module. --- lib/ssh/doc/src/ssh_sftp.xml | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) (limited to 'lib/ssh/doc/src') diff --git a/lib/ssh/doc/src/ssh_sftp.xml b/lib/ssh/doc/src/ssh_sftp.xml index 76d2b21946..f9f1e0953b 100644 --- a/lib/ssh/doc/src/ssh_sftp.xml +++ b/lib/ssh/doc/src/ssh_sftp.xml @@ -38,6 +38,12 @@ + + + + + + Error cause @@ -423,25 +429,27 @@ start_channel(ConnectionRef) -> - start_channel(ConnectionRef, Options) -> - {ok, Pid} | {error, reason()|term()} + start_channel(ConnectionRef, SftpOptions) -> + {ok, ChannelPid} | Error + start_channel(Host) -> start_channel(Host, Options) -> - start_channel(Host, Port, Options) -> - {ok, Pid, ConnectionRef} | {error, reason()|term()} - + start_channel(Host, Port, Options) -> start_channel(TcpSocket) -> start_channel(TcpSocket, Options) -> - {ok, Pid, ConnectionRef} | {error, reason()|term()} + {ok, ChannelPid, ConnectionRef} | Error Starts an SFTP client. - Host = string() - ConnectionRef = connection_ref() - Port = integer() - TcpSocket = port() - The socket is supposed to be from gen_tcp:connect or gen_tcp:accept with option {active,false} - Options = [{Option, Value}] + Host = ssh:host() + Port = inet:port_number() + TcpSocket = ssh:open_socket() + Options = [ sftp_option() + | ssh:client_option() ] + SftpOptions = [ sftp_option() ] + ChannelPid = pid() + ConnectionRef = ssh:connection_ref() + Error = {error, reason()}

If no connection reference is provided, a connection is set -- cgit v1.2.3