Elixir v1.3.0-rc.0 Port View Source
Functions related to Erlang ports.
Link to this section Summary
Functions
Makes a synchronous call to the port
and returns its reply as a term
Closes the port
Sends data
to the port driver port
Associates the port
identifier with a pid
Sends a synchronous control command to the port
and returns its reply as a binary
Returns information about the port
or nil
if the port is closed
Returns information about the port
or nil
if the port is closed
Returns a list of the ports for the current node
Opens an Erlang port given a tuple name
and a list of settings
Link to this section Types
name :: {:spawn, charlist | binary} | {:spawn_driver, charlist | binary} | {:spawn_executable, charlist | atom} | {:fd, non_neg_integer, non_neg_integer}
Link to this section Functions
Makes a synchronous call to the port
and returns its reply as a term.
Not all port drivers support this control feature.
For more information, see :erlang.port_call/3
.
Inlined by the compiler.
Closes the port
.
For more information, see :erlang.port_close/1
.
Inlined by the compiler.
command(port, iodata, [:force | :nosuspend]) :: boolean
Sends data
to the port driver port
.
For more information, see :erlang.port_command/2
.
Inlined by the compiler.
Associates the port
identifier with a pid
.
For more information, see :erlang.port_connect/2
.
Inlined by the compiler.
control(port, integer, iodata) :: iodata | binary
Sends a synchronous control command to the port
and returns its reply as a binary.
Not all port drivers support this feature.
For more information, see :erlang.port_control/3
.
Inlined by the compiler.
Returns information about the port
or nil
if the port is closed.
For more information, see :erlang.port_info/1
.
Returns information about the port
or nil
if the port is closed.
For more information, see :erlang.port_info/2
.
Returns a list of the ports for the current node.
For more information, see :erlang.ports/0
.
Inlined by the compiler.
Opens an Erlang port given a tuple name
and a list of settings
.
Name
The supported values for name
are:
{:spawn, command}
- to run an external program. The first space separated word ofcommand
will be considered as the name of the program to run, so use{:spawn_executable, command}
to run a program having spaces in its name.{:spawn_driver, command}
- similar to{:spawn, command}
, but to run a loaded driver.{:spawn_executable, filename}
- similar to{:spawn, filename}
, but to run an external executable. With this option,filename
in its whole is considered the name of the program to execute.{:fd, fd_in, fd_out}
- to access file descriptors used by Erlang,fd_in
being used for standard input,fd_out
for standard output.
For more information, see :erlang.open_port/2
.
Inlined by the compiler.