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

Version Path
mojombo-erlectricity-1.0.0 examples/echo/echo.erl
mojombo-erlectricity-1.0.1 examples/echo/echo.erl
mojombo-erlectricity-1.0.2 examples/echo/echo.erl
erlectricity-funbox-1.1.2 examples/echo/echo.erl
beambridge-0.9.0 examples/echo/echo.erl
erlectricity-1.1.1 examples/echo/echo.erl
erlectricity-1.1.0 examples/echo/echo.erl
erlectricity-1.0.0 examples/echo/echo.erl
erlectricity-1.0.1 examples/echo/echo.erl