Sha256: 8996b3a0c72c2d16b0216744fc729739a1f49767b6bc6f6320f9ee3489c42157
Contents?: true
Size: 343 Bytes
Versions: 17
Compression:
Stored size: 343 Bytes
Contents
require 'rubygems' require 'websocket' require 'dripdrop/message' Thread.abort_on_exception = true client = WebSocket.new('ws://127.0.0.1:8080') Thread.new do while data = client.receive puts data end end i = 0 while sleep 1 i += 1 puts '.' client.send(DripDrop::Message.new('Client Broadcast', :body => i).json_encoded) end
Version data entries
17 entries across 17 versions & 1 rubygems