Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-attach screen when using input/output stream #57

Open
eirikb opened this issue Jan 9, 2022 · 0 comments
Open

Re-attach screen when using input/output stream #57

eirikb opened this issue Jan 9, 2022 · 0 comments

Comments

@eirikb
Copy link

eirikb commented Jan 9, 2022

When using input and output on Screen is it possible to attach another stream later?

I'm using ssh2, and want to re-attach to existing Screen when a user re-connect with same public key.

My connection code currently looks like this:

session.on("shell", (accept) => {
  const stream = accept();

  const screen = blessed.screen({
    input: stream,
    output: stream,
  });
  ...

});

I've tried replacing the input, but it seems it must be set like above, can't be changed.
Then I tried attaching a top level Box, but it fails when being added to another Screen.
Then I tried creating a re-attachable Duplex stream, but it closed when the ssh session closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant