This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Matt Lyon (author)
Sat Nov 08 09:52:09 -0800 2008
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Sat Nov 01 22:12:43 -0700 2008 | |
| |
LICENSE | Sat Oct 18 18:56:28 -0700 2008 | |
| |
README.mkdn | Fri Nov 07 19:27:43 -0800 2008 | |
| |
Rakefile | Sat Oct 18 18:56:28 -0700 2008 | |
| |
datagrammer.gemspec | Fri Nov 07 16:23:05 -0800 2008 | |
| |
lib/ | Sat Nov 08 09:52:09 -0800 2008 | |
| |
spec/ | Sat Nov 08 09:52:09 -0800 2008 | |
| |
tasks/ | Fri Nov 07 16:23:05 -0800 2008 |
README.mkdn
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







