Using (stripped down ei.h) with generic TCP instead of ports

Brett Hemes brhemes@REDACTED
Thu Sep 17 15:04:36 CEST 2020


Hello all,

I have (real-time) C processes running in kernel mode that I would like to interface with my Erlang node on the same machine but in user mode.  Due to the kernel mode / real-time constrains (only access to subset of Standard C) , my C processes don't have access to stdin/out but they do have UDP and TCP connectivity (via proprietary environment library).  That said, I am thinking that I can use gen_tcp in place of open_port on the VM side along with appropriate encoding/decoding (via ei.h) on the RT C process side (this versus writing my own TCP scheme).

My issue now though is that ei.h in full doesn't compile due to only a subset of the standard C libraries being offered in my environment.  My thoughts are to strip out the heavier stuff that doesn't work in my environment from ei and keep the stuff I need (namely the encode/decode functionality).

I am still digging into ei.h to see if there are any snags to my approach (assuming it is worthwhile) AND I am very (very) new to Erlang so I just wanted to see if I was in the right direction for my particular (constrained) application scenario.  If there is a better way some enlightenment would also be appreciated ��

Thanks,
Brett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20200917/4fd43645/attachment.htm>


More information about the erlang-questions mailing list