diff options
| author | Logan Hunt <loganhunt@simponic.xyz> | 2022-12-30 05:53:15 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-30 05:53:15 -0700 |
| commit | 52fbc0b0161d2d30583d7f04eef57a29e441e1d2 (patch) | |
| tree | f882037a2820973ba6dc5f64206b01dba03266d8 /lib/chessh/ssh/cli.ex | |
| parent | c143bb549c53f2737c41cdfce6cc2598c5489bdc (diff) | |
| parent | e7d8c61487815bd90ec5834dad5e6f64dd951b53 (diff) | |
| download | chessh-52fbc0b0161d2d30583d7f04eef57a29e441e1d2.tar.gz chessh-52fbc0b0161d2d30583d7f04eef57a29e441e1d2.zip | |
Merge pull request #2 from Simponic/erlang_ssh_server
Erlang ssh server #2
Diffstat (limited to 'lib/chessh/ssh/cli.ex')
| -rw-r--r-- | lib/chessh/ssh/cli.ex | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/chessh/ssh/cli.ex b/lib/chessh/ssh/cli.ex new file mode 100644 index 0000000..71d789b --- /dev/null +++ b/lib/chessh/ssh/cli.ex @@ -0,0 +1,26 @@ +defmodule Chessh.SSH.Cli do + @behaviour :ssh_server_channel + + def init(_args) do + {:ok, %{}} + end + + def handle_msg(_message, state) do + {:ok, state} + end + + def handle_ssh_msg( + {:ssh_cm, _connection_handler, {:exit_signal, channel_id, _signal, _err, _lang}}, + state + ) do + {:stop, channel_id, state} + end + + def handle_ssh_msg(_message, state) do + {:ok, state} + end + + def terminate(_reason, _state) do + :ok + end +end |
