View Source prim_inert (inert v1.0.5)
Link to this section Summary
Functions
Transfer ownership of the inert port driver from the current process to another process.
Link to this section Functions
-spec controlling_process(inert_drv:ref(), 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.-spec fdclr(inert_drv:ref(), integer()) -> ok | inert_drv:errno().
-spec fdclr(inert_drv:ref(), integer(), inert_drv:mode() | proplists:proplist()) -> ok | inert_drv:errno().
-spec fdset(inert_drv:ref(), integer()) -> ok | inert_drv:errno().
-spec fdset(inert_drv:ref(), integer(), inert_drv:mode() | proplists:proplist()) -> ok | inert_drv:errno().
-spec poll(inert_drv:ref(), integer()) -> {ok, read} | {error, timeout} | inert_drv:errno().
-spec poll(inert_drv:ref(), integer(), inert_drv:mode() | proplists:proplist()) -> {ok, read | write} | {error, timeout} | inert_drv:errno().
-spec poll(inert_drv:ref(), integer(), inert_drv:mode(), timeout()) -> {ok, read | write} | {error, timeout} | inert_drv:errno().
-spec stop(inert_drv:ref()) -> ok.