aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src
diff options
context:
space:
mode:
authorViktor Söderqvist <[email protected]>2024-01-12 16:33:18 +0100
committerLoïc Hoguin <[email protected]>2025-02-26 14:43:45 +0100
commitd9f9d4dc30cf6bbd6f5fc2b8a8bb6d895e4c209d (patch)
tree707c21e1b83a7904dfac979762cf3c3eae5469c9 /doc/src
parent85fe0a9e315d7af90d6089d0daf21a9bc6a10c0a (diff)
downloadgun-d9f9d4dc30cf6bbd6f5fc2b8a8bb6d895e4c209d.tar.gz
gun-d9f9d4dc30cf6bbd6f5fc2b8a8bb6d895e4c209d.tar.bz2
gun-d9f9d4dc30cf6bbd6f5fc2b8a8bb6d895e4c209d.zip
Allow specifying functions for reply_to
LH: I have fixed types, extended tests and tweaked a bit.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/manual/gun.asciidoc7
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/src/manual/gun.asciidoc b/doc/src/manual/gun.asciidoc
index 60f217a..ece9d2a 100644
--- a/doc/src/manual/gun.asciidoc
+++ b/doc/src/manual/gun.asciidoc
@@ -442,7 +442,8 @@ Request headers.
----
req_opts() :: #{
flow => pos_integer(),
- reply_to => pid()
+ reply_to => pid() | {module(), atom(), list()}
+ | fun((_) -> _) | {fun(), list()}
}
----
@@ -457,7 +458,8 @@ flow control is disabled.
reply_to (`self()`)::
-The pid of the process that will receive the response messages.
+The pid of the process that will receive the response messages,
+or a function that will be called with the message as argument.
=== socks_opts()
@@ -598,6 +600,7 @@ By default no user option is defined.
== Changelog
+* *2.2*: The `reply_to` option now accepts functions.
* *2.1*: The HTTP/2 option list was updated with new options.
* *2.0*: The `default_protocol` and `user_opts` Websocket
options were added.