<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">It is hard to say what the issue is
(from my point of view) with the information given. However,
there is a way of generating a port driver automatically, with
async support here: <a class="moz-txt-link-freetext" href="https://github.com/okeuday/GEPD">https://github.com/okeuday/GEPD</a> . If you try
the example, or look at it, it should help... it is doing an async
request after a sleep, as shown in the output within the README
(and you may be able to adapt your source code to use it, to avoid
some of the port driver details, if that helps you).<br>
<br>
On 10/18/2013 03:41 PM, Winston Smith wrote:<br>
</div>
<blockquote
cite="mid:CADH-AwEobnshgMfX8NRUW=3C5A7Kcyre131p=LzHYzfbPrD3hA@mail.gmail.com"
type="cite">
<meta http-equiv="Context-Type" content="text/html;
charset=ISO-8859-1">
<div dir="ltr">I have port driver that does async [non-blocking]
I/O (using driver_select() etc) and on the ready_io READ
callback, I'm trying to send data back to the Erlang side
using erl_drv_output_term(). Everything seems to work, except
that I never see the data on the Erlang side.
<div>
<br>
</div>
<div>The Erlang side of this is a gen_server that opens the port
in it's init() call. The incoming data is asynchronous, so I
can't use the port_command()-then-receive idiom -- I was
expecting to be able to implement a handle_info() to catch the
message, but I just don't see anything on the Erlang side.</div>
<div><br>
</div>
<div>I'm guessing that somehow the port driver owner isn't the
same thing as the gen_server, even though I'm doing the
port_open() during gen_server:init().</div>
<div><br>
</div>
<div>Any ideas? Thanks,</div>
<div><br>
</div>
<div>-W</div>
<div><br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
erlang-questions mailing list
<a class="moz-txt-link-abbreviated" href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a>
<a class="moz-txt-link-freetext" href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a>
</pre>
</blockquote>
<br>
</body>
</html>