Skip to content

Instantly share code, notes, and snippets.

@useronym
Created May 6, 2017 20:06
Show Gist options
  • Save useronym/dd8439997835811090928c21d844767f to your computer and use it in GitHub Desktop.
Save useronym/dd8439997835811090928c21d844767f to your computer and use it in GitHub Desktop.
(defun handle_ssh_msg
(((tuple 'ssh_cm conn-ref
(tuple 'pty chan-id want-reply
(tuple term width height _ _ modes)))
state)
(progn (if want-reply
(ssh_connection:reply_request conn-ref 'false 'success chan-id))
(tuple 'ok state)))
(((tuple 'ssh_cm conn-ref
(tuple 'shell chan-id want-reply)))
(progn (if want-reply
(ssh_connection:reply_request conn-ref 'false 'success chan-id))
(tuple 'ok state)))
(((tuple 'ssh_cm conn-ref
(tuple 'window_change chan-id width height _ _)))
(tuple 'ok state))
(((tuple 'ssh_cm conn-ref (tuple 'data chan-id 0 input)) state)
(tuple 'ok state)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment