Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 465 Bytes

File metadata and controls

20 lines (15 loc) · 465 Bytes

warmer-websocket

This is a pure Ruby websocket implementation. It supports TLS (wss://) clients and servers and requires no additional dependencies.

Example Server

Echo messages received back to the client

options = { :host => 'localhost', :port => '8088' }
socket_server = WebSocket::Server.new(options)
socket_server.run!
server.on(:text) do |conn, payload|
  conn.send_frame(1, payload.string)
end

Testing

To run tests, run make test.