Skip to content

Commit

Permalink
doc/api-sessions (Callbacks): Refer to "Association Lists"
Browse files Browse the repository at this point in the history
* doc/api-sessions.texi (Callbacks): Add a reference to "Association Lists" in
GNU Guile Reference Manual.
  • Loading branch information
artyom-poptsov committed Nov 5, 2024
1 parent f36f828 commit 1372683
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions doc/api-sessions.texi
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,9 @@ passed as an argument.
@node Callbacks
@subsection Callbacks

Guile-SSH uses an association list (alist) to represent session callbacks; the
key is a callback name, and the value is expecting to be a procedure.
Guile-SSH uses an association list (@pxref{Association Lists,,, guile, The GNU
Guile Reference Manual}) to represent session callbacks; the key is a callback
name, and the value is expecting to be a procedure.

Session callbacks is the way to handle some events, notably the incoming
reverse port forwarding requests on the server side. Each callback is called
Expand All @@ -442,7 +443,7 @@ Example:
;; Now we can set our callback:
(session-set! session
'callbacks
'callbacks
`((user-data . #f)
(global-request-callback . ,handle-global-request)))
Expand Down

0 comments on commit 1372683

Please sign in to comment.