[erlang-questions] Linked-in drivers: output and control callbacks

Joel Reymont joelr1@REDACTED
Thu Dec 13 19:46:15 CET 2007


It seems that the control callback is invoked by port_command/3 but  
only port_command/2 is documented in the man pages.

Does it mean that I should not worry about control at all?

I would still like to know its intended use.

	Thanks, Joel

On Dec 13, 2007, at 6:31 PM, Joel Reymont wrote:

> There are two similar callbacks in the driver entry: output and  
> control. The signatures are virtually identical.
>
> My understanding is that Port ! {self(),  {command,  Data}} triggers  
> output whereas port_command(Port, Data)  triggers control.
>
> When should control be used?
>
> Are there any reasons to use control at all?
>
> Are there any reasons to prefer output over control or vise versa?
>
> 	Thanks, Joel
>
> --
> http://wagerlabs.com
>
>
>
>
>

--
http://wagerlabs.com








More information about the erlang-questions mailing list