This is a library that provides two tools:
- a server that accepts a specific set UDP commands
- a client for sending UDP commands
There are three files in the
examples folder that show how a client, a server and a monitor could be implemented. The server and the monitor require a local Redis server.
In order to start them, clone the repository, run
bin/setup then run the following commands, ideally in different terminal windows so you can watch them at the same time.
$ ruby examples/server $ ruby examples/monitor $ ruby examples/client
You need to install the gem using the following command:
$ gem install udipity
The server and the monitor require a Redis server to be running on localhost on port 6379.
require 'udipity' host = '0.0.0.0' # UDP connections require an IP address port = 9000 class Udipity::Command::Foo < Udipity::Command # Add code end Udipity::Server.register Udipity::Command::Foo Udipity::Server.start host, port
After checking out the repo, run
bin/setup to install dependencies. Then, run
bin/console for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run
bundle exec rake install. To release a new version, update the version number in
version.rb, and then run
bundle exec rake release to create a git tag for the version, push git commits and tags, and push the
.gem file to rubygems.org.
- Fork it ( https://github.com/[my-github-username]/udipity/fork )
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create a new Pull Request