<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Greetings,<br class=""><br class="">You might want to start from<br class=""><a href="https://github.com/ebengt/erlang_string_io" class="">https://github.com/ebengt/erlang_string_io</a><br class=""><br class="">Only for a string.<br class=""><br class="">Best Wishes,<br class="">bengt<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 13 Jan 2021, at 14:37, Сергей Прохоров <seriy.pr@gmail.com> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi, Yestin,<div class=""><br class=""></div><div class="">I recently implemented (write-only) IO-server in epgsql:</div><div class=""><br class=""></div><div class=""><a href="https://github.com/epgsql/epgsql/pull/248/files#diff-bee3ee44dca8eaa3ab72727b8d11c695f2ae4dcf0a0534fc51323d0aaa1a3a9fR523-R550" class="">https://github.com/epgsql/epgsql/pull/248/files#diff-bee3ee44dca8eaa3ab72727b8d11c695f2ae4dcf0a0534fc51323d0aaa1a3a9fR523-R550</a><br class=""></div><div class=""><br class=""></div><div class="">I'd say it's quite easy task to do, the protocol itself is very compact and well documented and it has a complete example:</div><div class=""><br class=""></div><div class=""><a href="https://erlang.org/doc/apps/stdlib/io_protocol.html" class="">https://erlang.org/doc/apps/stdlib/io_protocol.html</a><br class=""></div><div class=""><br class=""></div><div class="">I think starting normal gen_server that takes your data string in `init/1` or maybe receives it in a separate call would work fine. And you'd need to handle `{io_request, ..}` messages in `handle_info` gen_server callback.</div><div class=""><br class=""></div><div class="">Regards,</div><div class="">Sergey</div></div>
</div></blockquote></div><br class=""></body></html>