set_owner(ConnPid, OwnerPid) -> ok ConnPid :: pid() OwnerPid :: pid()
gun:set_owner - Set a new owner for the connection
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.
The pid of the Gun connection process.
The pid of the new owner for the connection.
The atom ok is returned.
ok = gun:set_owner(ConnPid, OwnerPid).
gun(3), gun:open(3), gun:open_unix(3), gun:shutdown(3), gun:close(3)
Support my work on Cowboy, Ranch, Gun and Erlang.mk via GitHub Sponsors. The funds cover domain names and development tools.