summaryrefslogtreecommitdiff
path: root/lib/chessh/ssh/cli.ex
blob: 71d789b72fdb02b3b5312d1be6825c0882918828 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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