From a5f5feb9b4c4bedfa027b07e33a5d1ccc9fb240b Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 8 Aug 2019 13:37:05 +0200 Subject: ssh: Use new ssh_connection:event() type in channel defs --- lib/ssh/doc/src/ssh_client_channel.xml | 14 +++++++------- lib/ssh/doc/src/ssh_server_channel.xml | 8 ++++---- lib/ssh/src/ssh_client_channel.erl | 2 +- lib/ssh/src/ssh_server_channel.erl | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/ssh/doc/src/ssh_client_channel.xml b/lib/ssh/doc/src/ssh_client_channel.xml index cd28b95fd3..e6683dbd0b 100644 --- a/lib/ssh/doc/src/ssh_client_channel.xml +++ b/lib/ssh/doc/src/ssh_client_channel.xml @@ -150,12 +150,12 @@ {init_args(), list()}

The list of arguments to the init function of the callback module.

- {cm, ssh:connection_ref()} + {cm, ssh:connection_ref()}

Reference to the ssh connection as returned by ssh:connect/3.

- {channel_id, ssh:channel_id()} + {channel_id, ssh:channel_id()}

Id of the ssh channel as returned by ssh_connection:session_channel/2,4.

@@ -198,7 +198,7 @@ {ok, ChannelRef} | {error, Reason} Starts a process that handles an SSH channel. - SshConnection = ssh:connection_ref() + SshConnection = ssh:connection_ref() As returned by ssh:connect/3 ChannelId = ssh:channel_id() @@ -374,7 +374,7 @@ function and all channels are to handle the following message.

- {ssh_channel_up, ssh:channel_id(), ssh:connection_ref()} + {ssh_channel_up, ssh:channel_id(), ssh:connection_ref()}

This is the first message that the channel receives. It is sent just before the init/1 function @@ -393,21 +393,21 @@ ChannelId, State} Handles ssh connection protocol messages. - Msg = ssh_connection:event() + Msg = ssh_connection:event() ChannelId = ssh:channel_id() State = term()

Handles SSH Connection Protocol messages that may need service-specific attention. For details, - see ssh_connection:event(). + see ssh_connection:event().

The following message is taken care of by the ssh_client_channel behavior.

- {closed, ssh:channel_id()} + {closed, ssh:channel_id()}

The channel behavior sends a close message to the other side, if such a message has not already been sent. Then it terminates the channel with reason normal.

diff --git a/lib/ssh/doc/src/ssh_server_channel.xml b/lib/ssh/doc/src/ssh_server_channel.xml index a4e18bbfbf..87c745c9fb 100644 --- a/lib/ssh/doc/src/ssh_server_channel.xml +++ b/lib/ssh/doc/src/ssh_server_channel.xml @@ -112,7 +112,7 @@ function and all channels are to handle the following message.

- {ssh_channel_up, ssh:channel_id(), ssh:connection_ref()} + {ssh_channel_up, ssh:channel_id(), ssh:connection_ref()}

This is the first message that the channel receives. This is especially useful if the server wants to send a message to the client without first @@ -129,21 +129,21 @@ ChannelId, State} Handles ssh connection protocol messages. - Msg = ssh_connection:event() + Msg = ssh_connection:event() ChannelId = ssh:channel_id() State = term()

Handles SSH Connection Protocol messages that may need service-specific attention. For details, - see ssh_connection:event(). + see ssh_connection:event().

The following message is taken care of by the ssh_server_channel behavior.

- {closed, ssh:channel_id()} + {closed, ssh:channel_id()}

The channel behavior sends a close message to the other side, if such a message has not already been sent. Then it terminates the channel with reason normal.

diff --git a/lib/ssh/src/ssh_client_channel.erl b/lib/ssh/src/ssh_client_channel.erl index f985d8e273..3bd1e1fdf1 100644 --- a/lib/ssh/src/ssh_client_channel.erl +++ b/lib/ssh/src/ssh_client_channel.erl @@ -52,7 +52,7 @@ -callback handle_msg(Msg ::term(), State :: term()) -> {ok, State::term()} | {stop, ChannelId::ssh:channel_id(), State::term()}. --callback handle_ssh_msg({ssh_cm, ConnectionRef::ssh:connection_ref(), SshMsg::term()}, +-callback handle_ssh_msg(ssh_connection:event(), State::term()) -> {ok, State::term()} | {stop, ChannelId::ssh:channel_id(), State::term()}. diff --git a/lib/ssh/src/ssh_server_channel.erl b/lib/ssh/src/ssh_server_channel.erl index 555080e9ee..1905c40c98 100644 --- a/lib/ssh/src/ssh_server_channel.erl +++ b/lib/ssh/src/ssh_server_channel.erl @@ -37,7 +37,7 @@ -callback handle_msg(Msg ::term(), State :: term()) -> {ok, State::term()} | {stop, ChannelId::ssh:channel_id(), State::term()}. --callback handle_ssh_msg({ssh_cm, ConnectionRef::ssh:connection_ref(), SshMsg::term()}, +-callback handle_ssh_msg(ssh_connection:event(), State::term()) -> {ok, State::term()} | {stop, ChannelId::ssh:channel_id(), State::term()}. -- cgit v1.2.3