Skip to content

Repository files navigation

Ruby binding for SmartFox’s client. docs2x.smartfoxserver.com/api-docs/javadoc/client/

Gem | Source | Documentation

Add this line to your application’s Gemfile:

gem'rubyfox-client'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rubyfox-client
require'rubyfox/client'ARGV.size==3orabort"usage: simple.rb username password zone"Rubyfox::Client.boot!# optionaloptions = {
host:'127.0.0.1',
debug:true
}
client = Rubyfox::Client.new(options)
client.on_event:connectiondo|event|p:connected!client.send:login, *ARGVendclient.on_event:logindo|event|p:login=>event.params[:zone]
client.disconnectendclient.on_event:login_errordo|event|p:login_failedclient.disconnectendclient.on_event:connection_lostdo|event|p:disconnectedclient.exitendclient.connect

See github.com/neopoly/rubyfox-client/tree/master/examples for more examples.

  • Tests!

  1. Fork it

  2. Create your feature branch (‘git checkout -b my-new-feature`)

  3. Commit your changes (‘git commit -am ’Add some feature’‘)

  4. Push to the branch (‘git push origin my-new-feature`)

  5. Create new Pull Request

About

Ruby binding for SmartFox's client.

Resources

Stars

4 stars

Watchers

20 watching

Forks

Releases

Packages

Used by

Contributors

Languages