No commit activity in last 3 years
No release in over 3 years
Ruby Socket.IO emitter implementation.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.6
>= 0
>= 0

Runtime

>= 0
 Project Readme

SocketIO::Emitter

Build Status

A Ruby implementation of socket.io-emitter.

How to use

require 'socket.io-emitter'

emitter = SocketIO::Emitter.new
emitter.emit('time', DateTime.now.to_s)

Installation

Add this line to your application's Gemfile:

gem 'socket.io-emitter'

And then execute:

$ bundle

Or install it yourself as:

$ gem install socket.io-emitter

API

Emitter.new([opts])

The following options are allowed:

  • key: the name of the key to pub/sub events on as prefix (socket.io)
  • redis: the Instance of Redis (redis://127.0.0.1:6379/0)

Emitter#to(room)

Specifies a specific room that you want to emit to.

Emitter#in(room)

Alias of Emitter#to.

Emitter#of(namespace)

Specifies a specific namespace that you want to emit to.

License

MIT