Cure.Port
Module that can communicate with C using a Port directly (no GenServer/Supervisor is used here, currently only supports synchronous communication).
Summary↑
close(port) | Closes a Port |
load(program_location) | Opens a Port that can communicate with a C-program |
send_data(port, data, timeout \\ 1000) | Sends data to a Port. This function blocks until a reply is received or until the function times out (default is 1 second) |
Functions
Specs:
- close(port) :: :ok
Closes a Port.
Specs:
- load(String.t) :: port
Opens a Port that can communicate with a C-program.
Specs:
- send_data(port, binary, timeout) :: binary | :timeout
Sends data to a Port. This function blocks until a reply is received or until the function times out (default is 1 second).