[erlang-questions] io:request/2 documentation?
Tue Mar 17 20:54:10 CET 2009
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
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
trapexit.org. 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
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.
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.
Hope this helps a little,
2009/3/17 jm <jeffm@REDACTED>
> Reading up on Leex and Yeec at
> http://hopper.squarespace.com/blog/2008/5/29/leex-and-yecc.html and it
> makes use of io:request/2 in one example. Yet there doesn't appear to
> any documentation for io:request/2. Is this another undocumented OTP
> function for insiders? Can this be used with a socket generated by
> gen_tcp? (I'm guessing not) and, if not, is there a suitable substitute
> for use with a tcp socket?
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions