diff options
| author | Simponic <loganhunt@simponic.xyz> | 2022-12-31 02:29:38 -0700 |
|---|---|---|
| committer | Simponic <loganhunt@simponic.xyz> | 2022-12-31 02:31:58 -0700 |
| commit | 58d0b1a89c461467c9ea6229f9a6b3d5ed573da5 (patch) | |
| tree | f0e91ce7bccb93e755357395f1ed7a7a18d6257b /lib/chessh/ssh/client.ex | |
| parent | 3308036c0859dcca2d80d80396a19a3cca269e78 (diff) | |
| download | chessh-58d0b1a89c461467c9ea6229f9a6b3d5ed573da5.tar.gz chessh-58d0b1a89c461467c9ea6229f9a6b3d5ed573da5.zip | |
A simple stalling TUI! Also, ensure sessions are counted correctly. Next up, some way of pub-sub across multiple nodes
Diffstat (limited to 'lib/chessh/ssh/client.ex')
| -rw-r--r-- | lib/chessh/ssh/client.ex | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/chessh/ssh/client.ex b/lib/chessh/ssh/client.ex new file mode 100644 index 0000000..35893f1 --- /dev/null +++ b/lib/chessh/ssh/client.ex @@ -0,0 +1,16 @@ +defmodule Chessh.SSH.Client do + alias Chessh.SSH.Client + require Logger + + use GenServer + + # TODO: tui_state_stack is like [:menu, :player_settings, :change_password] or [:menu, {:game, game_id}, {:game_chat, game_id}] + + defstruct [:tui_pid, :width, :height, :player_id, :tui_state_stack] + + @impl true + def init([tui_pid, width, height] = args) do + Logger.debug("#{inspect(args)}") + {:ok, %Client{tui_pid: tui_pid, width: width, height: height}} + end +end |
