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

Brett Hemes <[email protected]>
Newsgroups gmane.comp.lang.erlang.general
Message-ID <CH2PR03MB5336B4161D26726C990181F6BE3E0@CH2PR03MB5336.namprd03.prod.outlook.com>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.