blob: ee12a67cbff6393ef8ae101c27e0c4b371d0b3f6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
= gun:set_owner(3)
== Name
gun:set_owner - Set a new owner for the connection
== Description
[source,erlang]
----
set_owner(ConnPid, OwnerPid) -> ok
ConnPid :: pid()
OwnerPid :: pid()
----
Set a new owner for the connection.
Only the current owner of the connection can set a new
owner.
Gun monitors the owner of the connection and automatically
shuts down gracefully when the owner exits.
== Arguments
ConnPid::
The pid of the Gun connection process.
OwnerPid::
The pid of the new owner for the connection.
== Return value
The atom `ok` is returned.
== Changelog
* *2.0*: Function introduced.
== Examples
.Set a new owner for the connection
[source,erlang]
----
ok = gun:set_owner(ConnPid, OwnerPid).
----
== See also
link:man:gun(3)[gun(3)],
link:man:gun:open(3)[gun:open(3)],
link:man:gun:open_unix(3)[gun:open_unix(3)],
link:man:gun:shutdown(3)[gun:shutdown(3)],
link:man:gun:close(3)[gun:close(3)]
|