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

Version Path
dripdrop-0.11.0-java example/complex/client.rb
dripdrop-0.11.0 example/complex/client.rb
dripdrop-0.10.0 example/complex/client.rb
dripdrop-0.10.0-java example/complex/client.rb
dripdrop-0.10.0.beta2 example/complex/client.rb
dripdrop-0.10.0.beta1 example/complex/client.rb
dripdrop-0.9.10 example/complex/client.rb
dripdrop-0.9.9 example/complex/client.rb
dripdrop-0.9.8 example/complex/client.rb
dripdrop-0.9.6 example/complex/client.rb
dripdrop-0.9.5 example/complex/client.rb
dripdrop-0.9.4 example/complex/client.rb
dripdrop-0.9.3 example/complex/client.rb
dripdrop-0.9.2 example/complex/client.rb
dripdrop-0.8.1 example/complex/client.rb
dripdrop-0.8.0 example/complex/client.rb
dripdrop-0.7.1 example/complex/client.rb