No commit activity in last 3 years
No release in over 3 years
Ruby gem to connect to a websocket server
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

HTML5 WebSocket client implementation in Ruby.

For server and non-blocking client, em-websocket ( https://github.com/igrigorik/em-websocket ) may be a better choice, especially if you want to use EventMachine.

Usage

Connects to Web Socket server at host example.com port 10081. client = Net::WS.new("ws://example.com:10081/") { |msg| puts message} The block specifies what should be done with received messages. In this case they are simply printed to stdout.

For sending data, use send(): client.send("Hello")

See the samples/ directory for actual example code.

Supported WebSocket protocol versions

WebSocket client speaks version 13 (RFC 6455).

License

New BSD License.