Hi Jeff,<br><br>No io:request/2 has not been documented yet. All it does is to send off a request to an io-server and wait for the reply. One reason for not having documented it is that up until very recently the io-server protocol has not been documented.<br>
<br>This has now changed. In January I wrote a description of the older io-server protocol. This description was included in my Erlang Rationale document which you can find in the User Contributions section of <a href="http://trapexit.org">trapexit.org</a>. A truly brilliant piece of writing. .-) There is now also a freshly written description of the newer io-server protocol which is included in the documentation of the just released version R13-A in the user's guide section of stdlib. The newer protocol is very similar to the older one, the main change is providing for some extra parameters for handling unicode.<br>
<br>You use io:request/2 in the same manner as it is shown in the leex and yecc blogg. A very good description by the way.<br><br>It can *NOT* be directly used with a gen_tcp generated socket. An io-server is a process which obeys the io-server protocol. It would, however, not be very difficult to write an io-server which could directly read/write against a gen_tcp socket. If someone could show me a preferred way of setting up and talking to a socket I can fix the io-server.<br>
<br>Hope this helps a little,<br><br>Robert<br><br><div class="gmail_quote">2009/3/17 jm <span dir="ltr"><<a href="mailto:jeffm@ghostgun.com">jeffm@ghostgun.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Reading up on Leex and Yeec at<br>
<a href="http://hopper.squarespace.com/blog/2008/5/29/leex-and-yecc.html" target="_blank">http://hopper.squarespace.com/blog/2008/5/29/leex-and-yecc.html</a> and it<br>
makes use of io:request/2 in one example. Yet there doesn't appear to<br>
any documentation for io:request/2. Is this another undocumented OTP<br>
function for insiders? Can this be used with a socket generated by<br>
gen_tcp? (I'm guessing not) and, if not, is there a suitable substitute<br>
for use with a tcp socket?<br>
<br>
Thanks,<br>
Jeff.<br>
<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://www.erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div><br>