Questions tagged [em-websocket]

EventMachine based WebSocket server

EventMachine based, async, Ruby WebSocket server.

Link to Github

52 questions
0
votes
2 answers

Run websocket onmessage in different thread

I am using websocket on a server as below. It responds to onmessage events, and are conditioned to do different tasks according to the message: require "websocket-eventmachine-server" WebSocket::EventMachine::Server.start(host: some_server_name,…
sawa
  • 165,429
  • 45
  • 277
  • 381
0
votes
1 answer

Ruby - Generating prime numbers for Websocket encryption

I'm creating a WebSocket Server in Ruby, and I would like to encrypt the string messages between the server and the client. I can't afford a certificate, so I was thinking that I would create an encryption algorithm using modulo. I need to generate…
Melvin Sowah
  • 700
  • 1
  • 10
  • 29
0
votes
1 answer

Using em-websocket gem can't change connection to 'ws://' RUBY

I'm new in Ruby. I'm trying to use WebSocket connection. So I use em-websocket gem. I also use Thin web server. I did everything like example told me to. So please help me out. But server keep returning me: HTTP/1.1 200 OK Content-Type: text/html;…
0
votes
2 answers

rails server wont start with em-websocket

I'm trying to build a rails websocket application using em-websocket. I have placed the below code in a file config/initalizers/websocket.rb but when I run 'rails server' the application does not start. if I remove the code it starts fine. The same…
user346443
  • 4,672
  • 15
  • 57
  • 80
0
votes
1 answer

is Ruby em-websocket blocking?

I'm writing a ruby program that has 2 threads. One that listens on an incoming UDP connection and another that broadcasts on a websocket from which browsers on the client side read.I'm using the em-websocket gem. However, My UDP listener thread…
-1
votes
1 answer

unable to install ruby em-websocket: giving fatal error in Ubuntu 16.04

websocket via gem install em-websocket. Got this error: compiling binder.cpp cc1plus: warning: command line option ‘-Wimplicit-int’ is valid for C/ObjC but not for C++ cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid…
-1
votes
2 answers

Send multiply messages in websocket using threads

I'm making a Ruby server using the em-websocket gem. When a client sends some message (e.g. "thread") the server creates two different threads and sends two anwsers to the client in parallel (I'm actually studying multithreading and websockets).…
1 2 3
4