Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tmm1-erlectricity

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tmm1-erlectricity

  • 0.2.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

erlectricity by Scott Fleckenstein Tom Preston-Werner

 http://github.com/mojombo/erlectricity
 

== DESCRIPTION:

Erlectricity allows a Ruby program to receive and respond to Erlang messages sent over the Erlang binary protocol.

== INSTALL:

$ gem install erlectricity

-or-

$ gem install mojombo-erlectricity -s http://gems.github.com

== CONTRIBUTE:

Contributions are welcome via GitHub! Fork the code from http://github.com/mojombo/erlectricity and send a pull request to mojombo.

== USAGE (Ruby side):

require 'rubygems' require 'erlectricity'

receive do |f| f.when(:echo, String) do |text| f.send!(:result, "You said: #{text}") f.receive_loop end end

== USAGE (Erlang side):

-module(echo). -export([test/0]).

test() -> Cmd = "ruby echo.rb", Port = open_port({spawn, Cmd}, [{packet, 4}, use_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("pn", [Text]) end.

FAQs

Package last updated on 10 Aug 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc