Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

statscloud.io-ruby-socket.io-client-simple

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

statscloud.io-ruby-socket.io-client-simple

  • 1.2.1.pre.3
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

statscloud.io-ruby-socket.io-client-simple

A simple ruby client for Node.js's Socket.IO v1.4.x, Supports only WebSocket.

v 1.2.1-1 Implement namespaces and simple binary support.

  • https://gitlab.com/agiliumlabs/statscloud.io-ruby-socket.io-client-simple

Install

gem install

% gem install statscloud.io-ruby-socket.io-client-simple

or use Gemfile with Bundler

gem 'statscloud.io-ruby-socket.io-client-simple'

Usage

require 'rubygems'
require 'statscloud.io-ruby-socket.io-client-simple'

def client 
  StatsCloudIO::SocketIO::Client::Simple
end

def configure
  url    = ARGV.shift || 'http://localhost:3000'
  socket = client.connect url
  
  socket.on :connect do
    puts "connect!!!"
  end
  
  socket.on :disconnect do
    puts "disconnected!!"
  end
  
  socket.on :error do |err|
    p err
  end
end

def send_data(chat, data)
  socket.emit chat, data
end

def send_binary_data(chat, data)
  socket.emit chat, client.as_byte_buffer(data)
end

Test

% gem install bundler
% bundle install
% npm install
% bundle exec rake test

Contributing

  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

FAQs

Package last updated on 12 Dec 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc