class WebSocket::Handshake::Handler::Server75
Private Instance Methods
Source
# File lib/websocket/handshake/handler/server75.rb, line 23 def handshake_keys [ %w[Upgrade WebSocket], %w[Connection Upgrade], [headers[:origin], @handshake.headers['origin']], [headers[:location], @handshake.uri] ] + protocol end
Source
# File lib/websocket/handshake/handler/server75.rb, line 18 def header_line 'HTTP/1.1 101 Web Socket Protocol Handshake' end
Source
# File lib/websocket/handshake/handler/server75.rb, line 9 def headers { origin: 'WebSocket-Origin', location: 'WebSocket-Location', protocol: 'WebSocket-Protocol' }.freeze end
Source
# File lib/websocket/handshake/handler/server75.rb, line 32 def protocol return [] unless @handshake.headers.key?(headers[:protocol].downcase) proto = @handshake.headers[headers[:protocol].downcase] [[headers[:protocol], @handshake.protocols.include?(proto) ? proto : nil]] end