class WebSocket::Handshake::Handler::Server75
def handshake_keys
- See: WebSocket::Handshake::Handler::Base#handshake_keys -
def handshake_keys [ %w[Upgrade WebSocket], %w[Connection Upgrade], [headers[:origin], @handshake.headers['origin']], [headers[:location], @handshake.uri] ] + protocol end
def header_line
- See: WebSocket::Handshake::Handler::Base#header_line -
def header_line 'HTTP/1.1 101 Web Socket Protocol Handshake' end
def headers
def headers { origin: 'WebSocket-Origin', location: 'WebSocket-Location', protocol: 'WebSocket-Protocol' }.freeze end
def protocol
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