Skip to content
This repository has been archived by the owner on Dec 7, 2018. It is now read-only.

Initial websocket support #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jeremyevans
Copy link

This adds initial websocket support. It is not complete yet as while
you can create a websocket and send data via the websocket, receiving
data from the websocket does not work, for reasons I've yet to
determine.

This changes the API for route_request, because Reel::Request#connection
is not defined. It includes the request object in a 'reel.request' entry
in the env, so that rack apps can do:

ws = env['reel.request'].websocket if env['reel.request'].websocket?

If anyone could provide a pointer to why receiving data via the websocket
may not be working, that would be helpful.

This adds initial websocket support.  It is not complete yet as while
you can create a websocket and send data via the websocket, receiving
data from the websocket does not work, for reasons I've yet to
determine.

This changes the API for route_request, because Reel::Request#connection
is not defined. It includes the request object in a 'reel.request' entry
in the env, so that rack apps can do:

  ws = env['reel.request'].websocket if env['reel.request'].websocket?
@tarcieri
Copy link
Member

For Rack applications, it might make more sense to use something more Rack-centric, like:

https://github.com/faye/faye-websocket-ruby

@jeremyevans
Copy link
Author

I'm building a websocket plugin for the web framework I work on (Roda), and I added support for faye-websocket-ruby first. I'd like to additionally support websockets via Reel/Celluloid, so that people that don't want to use eventmachine have a choice.

@Nowaker
Copy link

Nowaker commented Aug 8, 2015

@jeremyevans Did you have a chance to dig into it? I assumed reel supports websockets natively without having to use Event Machine. That's what Celluloid is for actually...

@jeremyevans
Copy link
Author

@Nowaker reel supports websockets, but reel-rack does not. I haven't done more work on this, and don't have plans to do so in the foreseeable future.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants