Pretending known chardata is an I/O device?

Roberto Aloi prof3ta@REDACTED
Wed Jan 13 12:18:07 CET 2021


Hi,

Erlang defines an I/O protocol. It’s pretty well documented here:
https://erlang.org/doc/apps/stdlib/io_protocol.html

Best,
Roberto Aloi

On Wed, 13 Jan 2021 at 11:59, Peti Gömöri <gomoripeti@REDACTED> wrote:

> hi Yestin
>
> the Erlang Language Server has a module that given a string implements "a
> subset of the io protocol in order to only support reading operations."
> https://github.com/erlang-ls/erlang_ls/blob/master/src/els_io_string.erl
> (given that it exists in erlang_ls I assume there is no such
> implementation in Erlang/OTP itself)
>
> hope this helps
>
> On Wed, Jan 13, 2021 at 8:41 AM Yestin L. Harrison <yestin@REDACTED> wrote:
>
>> Say I have some black box that expects some IO server to read from; what
>> is the recommended way of spawning such a server that can just be passed
>> some string/chardata()/binary/whatever and serve it in response to
>> io:request(...)? Am I going to have to write something like that myself or
>> is there something in the standard libraries that I'm missing?
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20210113/e9b0ad0d/attachment.htm>


More information about the erlang-questions mailing list