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

rubysl-socket

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rubysl-socket

  • 2.2.1
  • Rubygems
  • Socket score

Version published
Maintainers
2
Created
Source

rubysl-socket

An implementation of the Ruby socket standard library for Rubinius, written using Ruby and FFI (and a tiny bit of C++ defined in Rubinius itself). More information about the socket standard library can be found at http://ruby-doc.org/stdlib/libdoc/socket/rdoc/index.html.

Please note that only Rubinius is officially supported. While other Ruby implementations are free to use rubysl-socket according to its license we do not provide any support for this.

Issues for the socket standard library in general should be reported at https://bugs.ruby-lang.org/, only use this project's issue tracker for reporting issues with the Gem itself (e.g. something isn't implemented correctly).

Target

The 2.0 branch of rubysl-socket targets Ruby 2.x, other Ruby versions are currently not supported.

Unsupported Features

Currently the use of ancillary data is not supported. While Socket::AncillaryData exists and is implemented for the most part it's not used by BasicSocket#sendmsg and BasicSocket#recvmsg. Extracting/building ancillary data requires the use of platform specific macros and these can't be easily bound to Ruby via FFI. Using a C extension only adds more complexity for a feature that will most likely be rarely used, if ever.

Requirements

  • Rubinius 2.10 or newer
  • A POSIX compliant operating system

Windows is currently not supported and there are no plans to support it for the foreseeable future. The Rubinius team sadly lacks the capacity and experience to support Windows besides also supporting the countless Linux and BSD distributions out there.

Installation

By default rubysl-socket is already installed when you install Rubinius. Currently updating rubysl-socket requires re-installing Rubinius, in the future you can simply update rubysl-socket by running gem update rubysl-socket.

Contributing

In general the contributing guidelines are the same as Rubinius (http://rubinius.com/doc/en/contributing/). The structure of this repository is as following:

  • lib/rubysl/socket/: contains all code living under the RubySL::Socket namespace, mostly used for FFI code, helper methods, etc.
  • lib/socket/: contains the code of the public socket APIs such as Socket, TCPSocket, etc. Code in this directory should not refer to the Rubinius namespace directly, instead use (or create) methods defined under the RubySL::Socket namespace.
  • spec/: all mspec specs

To get started, clone the directory and install all Gems:

bundle install

You'll want to do this for both your local CRuby and Rubinius installations.

Running the specs under CRuby works as following:

mspec spec/path/to/file_spec.rb

Running the specs under Rubinius requires an extra environment variable so Rubinius loads the local rubysl-socket copy instead of the installed one:

RUBYLIB=.:lib mspec spec/path/to/file_spec.rb

All specs must pass on both CRuby and Rubinius.

License

rubysl-socket is licensed under the BSD license unless stated otherwise, a copy of this license can be found in the file "LICENSE". The MRI source code found in lib/socket/mri.rb is licensed under the same license as Ruby, a copy of this license can be found in the file itself.

FAQs

Package last updated on 09 Feb 2017

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