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

mt-uv-rays

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mt-uv-rays

  • 2.4.72
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

uv-rays

Build Status

UV-Rays was designed to eliminate the complexities of high-performance threaded network programming, allowing engineers to concentrate on their application logic.

Core Features

  1. TCP (and UDP) Connection abstractions
  2. Advanced stream tokenization
  3. Scheduled events (in, at, every, cron)
  4. HTTP 1.1 compatible client support

This adds to the features already available from Libuv on which the gem is based

Support

UV-Rays supports all platforms where ruby is available. Linux, OSX, BSD and Windows. MRI, jRuby and Rubinius.

Run gem install uv-rays to install

Getting Started

Here's a fully-functional echo server written with UV-Rays:

 require 'uv-rays'

 module EchoServer
  def on_connect(socket)
    @ip, @port = socket.peername
    logger.info "-- #{@ip}:#{@port} connected"
  end

  def on_read(data, socket)
    write ">>>you sent: #{data}"
    close_connection if data =~ /quit/i
  end

  def on_close
    puts "-- #{@ip}:#{@port} disconnected"
  end
end

reactor {
  UV.start_server "127.0.0.1", 8081, EchoServer
}

Integrations

UV-Rays works with many existing GEMs by integrating into common HTTP abstraction libraries

FAQs

Package last updated on 06 Apr 2022

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