<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Oct 18, 2013 at 5:45 PM, Thomas Stover <span dir="ltr"><<a href="mailto:tstover@alertlogic.com" target="_blank">tstover@alertlogic.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I suppose I could try to rebuild libei as a shared lib (why isn't it to<br>
start with?). That feels strange though, because is no one else using<br>
libei inside a driver? Does everyone just use only manual encoding from<br>
erlang to C when it comes to drivers. Does everyone just use external<br>
process ports when they use libei?<br></blockquote><div><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">You can use ei_decode*() family functions inside the driver's *_output() function, but since those functions deal with decoding Erlang terms from external binary format, you need to ensure that you use the term_to_binary(Term) encoding on the Erlang side when you send a message to the driver.  Since there's a little overhead in that serialization, in simple cases it may be a bit more efficient to come up with your own binary encoding/decoding.</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Serge</div></div></div></div>