New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mattly-datagrammer

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mattly-datagrammer

  • 0.4
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Datagrammer

by Matthew Lyon matt@flowerpowered.com

DESCRIPTION:

Datagrammer helps take the pain out of UDP by mitigating some of the packet encoding/decoding stuff, as well as providing a non-blocking listening thread.

FEATURES

  • Encodes/Decodes OSC-style packets (where a main 'address' is given along with typed arguments)
  • Listens for messages in its own thread, performs a callback when a message is received.
  • Has a default "speaking" address / port for talkback. the IP of the sender of a received packet is also made available to the callback.

SYNOPSIS

require 'datagrammer'

server = Datagrammer.new(5000)
server.register_rule /.*/, lambda {|msg| server.speak("received: #{msg.join(',')}") }

# set to speak at server's default speak destination
client = Datagrammer.new(5001, :speak_port => 5000)
client.register_rule 'received:', lambda {|msg| puts "rec'd #{msg}.join(' ')" }

client.speak(%w(hey joe))
sleep 0.1
# rec'd received: hey, joe

REQUIREMENTS

  • Rspec, if you wish to run the spec suite

FAQs

Package last updated on 11 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