From d7d109ca8ab68d7a62772305d543123233d4eea4 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Wed, 1 Jun 2016 16:43:29 +0200 Subject: ssh: update connect doc --- lib/ssh/doc/src/ssh.xml | 13 ++++++++----- lib/ssh/doc/src/ssh_sftp.xml | 11 ++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/lib/ssh/doc/src/ssh.xml b/lib/ssh/doc/src/ssh.xml index bd330e479f..501ca36b09 100644 --- a/lib/ssh/doc/src/ssh.xml +++ b/lib/ssh/doc/src/ssh.xml @@ -124,10 +124,10 @@ - connect(TcpSocket, Options) -> - connect(TcpSocket, Options, Timeout) -> connect(Host, Port, Options) -> - connect(Host, Port, Options, Timeout) -> + connect(Host, Port, Options, Timeout) -> + connect(TcpSocket, Options) -> + connect(TcpSocket, Options, Timeout) -> {ok, ssh_connection_ref()} | {error, Reason} Connects to an SSH server. @@ -140,7 +140,7 @@ Negotiation time-out in milli-seconds. The default value is infinity. For connection time-out, use option {connect_timeout, timeout()}. TcpSocket = port() - The socket is supposed to be from gen_tcp:connect with option {active,false} + The socket is supposed to be from gen_tcp:connect or gen_tcp:accept with option {active,false}

Connects to an SSH server. No channel is started. This is done @@ -722,12 +722,15 @@ shell(Host) -> shell(Host, Option) -> - shell(Host, Port, Option) -> _ + shell(Host, Port, Option) -> + shell(TcpSocket) -> _ Starts an interactive shell over an SSH server. Host = string() Port = integer() Options - see ssh:connect/3 + TcpSocket = port() + The socket is supposed to be from gen_tcp:connect or gen_tcp:accept with option {active,false}

Starts an interactive shell over an SSH server on the diff --git a/lib/ssh/doc/src/ssh_sftp.xml b/lib/ssh/doc/src/ssh_sftp.xml index 67531b7d99..eb6f43d417 100644 --- a/lib/ssh/doc/src/ssh_sftp.xml +++ b/lib/ssh/doc/src/ssh_sftp.xml @@ -526,10 +526,6 @@ - start_channel(TcpSocket) -> - start_channel(TcpSocket, Options) -> - {ok, Pid, ConnectionRef} | {error, reason()|term()} - start_channel(ConnectionRef) -> start_channel(ConnectionRef, Options) -> {ok, Pid} | {error, reason()|term()} @@ -537,13 +533,18 @@ start_channel(Host, Options) -> start_channel(Host, Port, Options) -> {ok, Pid, ConnectionRef} | {error, reason()|term()} + + start_channel(TcpSocket) -> + start_channel(TcpSocket, Options) -> + {ok, Pid, ConnectionRef} | {error, reason()|term()} + Starts an SFTP client. Host = string() ConnectionRef = ssh_connection_ref() Port = integer() TcpSocket = port() - The socket is supposed to be from gen_tcp:connect with option {active,false} + The socket is supposed to be from gen_tcp:connect or gen_tcp:accept with option {active,false} Options = [{Option, Value}] -- cgit v1.2.3