igrigorik / em-websocket

EventMachine based WebSocket server

Home Page:http://www.igvita.com/2009/12/22/ruby-websockets-tcp-for-the-browser/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hi , can you add long-pollling support? , I write a mask code for em-websocket

JokerCatz opened this issue · comments

first , sorry my poor English

I need websocket + long-polling server with same port
so I write a just work Ruby mask code in

https://github.com/JokerCatz/em-ws-plus-lp-mask-code

can you fix this support into this gem or just create a new gem?

I tried like socket.io or sockjs-ruby(same port to support long-polling & websocket) ... it many dirty for communicate data and can't write my own data schema...so I need this help , can you help me?

I don't think this is the way to go - the interface you'd want for a websocket is nothing like you'd want for a single long poll connection. Sockjs does the right thing and puts a websocket interface on top of a sequence of long poll (and other transport) connections, but it makes no sense to include in em-websocket.

Maybe take a look at https://github.com/faye/faye-websocket-ruby - this supports running on top of rack so you may find it easier to add polling.