summaryrefslogtreecommitdiff
path: root/lib/chessh/ssh/cli.ex
blob: 7ab04337bfa29350d24a314402b3ca7b21934343 (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() do
    {:ok, %{}}
  end

  def handle_msg(message, state) do
    {:ok, state}
  end

  def handle_ssh_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 terminate(reason, state) do
    :ok
  end
end