Erlang, C, IC and asyncronous servers/clients

Niclas Eklund nick@REDACTED
Thu Feb 22 12:53:30 CET 2001


Hello!

Can't you define the function to be oneway and add a new function which
send the N packets back to the Erlang side? If not, you must search for
all complete packets and return them in a sequence. The last option is to
use the C-interface directly, i.e., not via IC.

/Nick

On Wed, 21 Feb 2001, Jouni Ryno wrote:
> The current IC-system seems to generated code only for cases, were 
> communication is initiated from only one side. I would need to port 
> some older code, which used IG in more asynchronous way (yes, I know, 
> it was not completely safe).
> 
> In detail I have
> Erlang side                C side
> raw telemetry    ->     data processing, packet detection
>                         when packet found from raw telemetry
>                  <-       packet_type_X
>                  <-       packet_type_Y
>                  <-         up to N packets
> 
> C-process receives binary chunks from Erlang, whenever it finds a 
> valid, complete packet, it sends it to Erlang-process for further 
> distribution. The catch is, there's n packets to generate, so simple 
> function return values is not adequate.
> 
> At least the IC examples for C-server and -client don't allow this kind 
> of two-way message sending.
> 
> So to put it simply, is there a way to do it ? 
> 
> (and yes, the I could the processing in Erlang, but we also have to 
> give out source code for colleagues to analyze data later. Erlang is 
> used in real time situation )





More information about the erlang-questions mailing list