Sha256: 75d8685733f1fa6f62b16a544bc344b4030ae3db309be3d6bc1e077e6ac9abfe
Contents?: true
Size: 361 Bytes
Versions: 9
Compression:
Stored size: 361 Bytes
Contents
-module(echo). -export([test/0]). test() -> Cmd = "ruby echo.rb", Port = open_port({spawn, Cmd}, [{packet, 4}, nouse_stdio, exit_status, binary]), Payload = term_to_binary({echo, <<"hello world!">>}), port_command(Port, Payload), receive {Port, {data, Data}} -> {result, Text} = binary_to_term(Data), io:format("~p~n", [Text]) end.
Version data entries
9 entries across 9 versions & 4 rubygems