Module prim_inert

Copyright © 2015-2021, Michael Santos <michael.santos@gmail.com>

Function Index

controlling_process/2Transfer ownership of the inert port driver from the current process to another process.
fdclr/2
fdclr/3
fdset/2
fdset/3
poll/2
poll/3
poll/4
start/0
stop/1

Function Details

controlling_process/2

controlling_process(Port::inert_drv:ref(), Pid::pid()) -> ok | {error, not_owner | einval}

Transfer ownership of the inert port driver from the current process to another process.

Since any process can use the port, controlling_process/2 just sets the port owner and links the process to the port. The original owner will continue to receive messages for any file descriptors it has added to the pollset.

fdclr/2

fdclr(Port::inert_drv:ref(), FD::integer()) -> ok | inert_drv:errno()

fdclr/3

fdclr(Port::inert_drv:ref(), FD::integer(), Options::inert_drv:mode() | proplists:proplist()) -> ok | inert_drv:errno()

fdset/2

fdset(Port::inert_drv:ref(), FD::integer()) -> ok | inert_drv:errno()

fdset/3

fdset(Port::inert_drv:ref(), FD::integer(), Options::inert_drv:mode() | proplists:proplist()) -> ok | inert_drv:errno()

poll/2

poll(Port::inert_drv:ref(), FD::integer()) -> {ok, read} | {error, timeout} | inert_drv:errno()

poll/3

poll(Port::inert_drv:ref(), FD::integer(), Options::inert_drv:mode() | proplists:proplist()) -> {ok, read | write} | {error, timeout} | inert_drv:errno()

poll/4

poll(Port::inert_drv:ref(), FD::integer(), Mode::inert_drv:mode(), Timeout::timeout()) -> {ok, read | write} | {error, timeout} | inert_drv:errno()

start/0

start() -> any()

stop/1

stop(Port::inert_drv:ref()) -> ok


Generated by EDoc