From eb808a3f8bbd97d2a2ea0114b43b708a17b44066 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Fri, 11 Apr 2025 14:34:51 +0200 Subject: Gun 2.2.0 --- docs/en/gun/2.2/manual/gun_notify/index.html | 207 +++++++++++++++++++++++++++ 1 file changed, 207 insertions(+) create mode 100644 docs/en/gun/2.2/manual/gun_notify/index.html (limited to 'docs/en/gun/2.2/manual/gun_notify/index.html') diff --git a/docs/en/gun/2.2/manual/gun_notify/index.html b/docs/en/gun/2.2/manual/gun_notify/index.html new file mode 100644 index 00000000..70399f43 --- /dev/null +++ b/docs/en/gun/2.2/manual/gun_notify/index.html @@ -0,0 +1,207 @@ + + + + + + + + + + Nine Nines: gun_notify(3) + + + + + + + + + + + + + + + +
+
+
+
+ +

gun_notify(3)

+ +

Name

+

gun_notify - Optional event notification

+

Description

+
+
{gun_notify, ConnPid, settings_changed, Settings}
+
+ConnPid  :: pid()
+Settings :: map()
+
+

Optional event notification.

+

Only two event notifications currently exist:

+
  • settings_changed informs the user that the server has modified its connection settings. +
  • +
  • ping_ack informs the user that acknowledgement for a user ping was received. +
  • +
+

Elements

+
ConnPid
+

The pid of the Gun connection process.

+
+
Event
+

Identifier for the event. Currently can only be settings_changed or ping_ack.

+
+
Data
+

Data for the event. Currently can only be the new connection settings, or the ping reference.

+
+
+

Changelog

+
  • 2.2: Message introduced. +
  • +
+

Examples

+
Receive a gun_notify message in a gen_server
+
+
handle_info({gun_notify, ConnPid, settings_changed, Settings},
+            State=#state{conn_pid=ConnPid}) ->
+    %% Do something.
+    {noreply, State}.
+
+

See also

+

gun(3), gun:ping(3)

+ + + + + + +
+ +
+ + +

+ Gun + 2.2 + Function Reference + +

+ + + +

Navigation

+ +

Version select

+ + +

Like my work? Donate!

+

Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

+
+ + + + + + + + + +

Recurring payment options are also available via GitHub Sponsors. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.

+ + + +
+
+
+
+ + + + + + + + + -- cgit v1.2.3