Class: Thin::Request::Protocol75
- Inherits:
-
WebSocketHandler
- Object
- WebSocketHandler
- Thin::Request::Protocol75
- Defined in:
- lib/thin_extensions.rb
Instance Method Summary collapse
Methods inherited from WebSocketHandler
Constructor Details
This class inherits a constructor from Thin::Request::WebSocketHandler
Instance Method Details
#handshake ⇒ Object
82 83 84 85 86 87 88 89 |
# File 'lib/thin_extensions.rb', line 82 def handshake upgrade = "HTTP/1.1 101 Web Socket Protocol Handshake\r\n" upgrade << "Upgrade: WebSocket\r\n" upgrade << "Connection: Upgrade\r\n" upgrade << "WebSocket-Origin: #{@request.env['HTTP_ORIGIN']}\r\n" upgrade << "WebSocket-Location: #{@request.websocket_url}\r\n\r\n" upgrade end |