New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

red_socket

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

red_socket

bundlerRubyGems.org
Version
0.0.2
Version published
Maintainers
1
Created
Source

RedSocket Build Status

RedSocket client

Send notification for clients listening on HTML5 websockets. See more details on http://red-socket.com .

Installation

Add to your Gemfile and run the bundle command to install it.

gem "red_socket"

Create config/initializers/red_socket.rb file wit following config:

RedSocket::Base.configure do |config|
  config.account_id = "account_name" # within host name
  config.api_key = "some_api_key"
  config.api_secret = "some_secret_key"
end

Sign up for an account on http://red-socket.com/signup to get your key pair.

Requires Ruby 1.9 or later.

Usage

Call RedSocket.notify('my_channel') to send message to listening clients. By default it will send a 'notification' event which can be passed as the second argument.

RedSocket::Base.notify('my_channel', 'my_custom_event')

Additional message can be send within third parameter

RedSocket::Base.notify('my_channel', 'my_custom_event', 'it can be for example a json message, so it can be parsed by the browser')

Development

Questions or problems? Please post them on the issue tracker. You can contribute changes by forking the project and submitting a pull request. Feel free to do it.

This gem is created by Mariusz Wyrozebski and is under the MIT License.

FAQs

Package last updated on 14 Mar 2012

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