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

lwes_pure

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lwes_pure

  • 0.1.4
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

= lwes_pure

LWES - Light Weight Event System protocol implemented in pure ruby. The original lwes gem is a thin wrapper around the c library, and does not handle data types for dynamic LWES events. This gem allows users to define the data type of attributes in an clear way, so that your LWES event listeners will be happy. This library includes the following components:

  • Lwes::Event for reading from and writing to IO objects.
  • Lwes::Emitter for emitting LWES events through UDP socket.

== Installation

gem install lwes_pure

== Initialization

If only Lwes::Event is needed, require like this:

require 'lwes/event'

If both Lwes::Event and Lwes::Emitter are needed, require like this:

require 'lwes'

== Usage

Here is a short example to create an event and send it off using udp

requiring lwes_pure gem

require 'lwes'

create a LWES emitter

emitter = Lwes::Emitter.new({ :host => "127.0.0.1", :port => "12345" })

create a LWES event with 3 attributes of type int16, string, and ip array

event = Lwes::Event.new({ :name => "Test::Event", :attributes => { 'int_attribute' => [:int16, 123], 'string_attribute' => [:attr_str, "test string"], 'ip_attribute' => [:ip_v4_array, ["1.2.3.4", "5.6.7.8", "192.168.0.255"]] } })

send it off with the emitter

emitter.emit event

== Future works

  • Implement Listener
  • Better error handling

== Contributing to lwes_pure

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
  • Fork the project
  • Start a feature/bugfix branch
  • Commit and push until you are happy with your contribution
  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

== Copyright

Copyright (c) 2011 Aaron Qian. See LICENSE.txt for further details.

FAQs

Package last updated on 22 Apr 2011

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