halorgium / rack-client

A client wrapper around a rack app or live-http
http://halorgium.github.com/rack-client
MIT License
99 stars 28 forks source link

Support for hijacking the socket #16

Open halorgium opened 11 years ago

halorgium commented 11 years ago

Sooo, rack now has hijack support. And I thought it might be interesting to put this on the client side.

Being able to get a handle on the raw client socket would allow for a similar advantage for WebSockets etc.

/cc @benburkert @mkb @jacobo

benburkert commented 11 years ago

Sounds like a cool idea. It would be nice if you could add a "protocol upgrade detection" middleware to the stack that hijacks the socket when websockets, http 2.0, or whatever is initiated by the server. Although the client code for those different protocols falls outside the scope of this library.

halorgium commented 11 years ago

It would be possible to use https://github.com/faye/websocket-protocol-ruby for the WebSocket part.