Sha256: d4a174e4aaaed95fdeb2dbc2693ab47c88bd2493b0dfa28b4bbb6872d8194bc6
Contents?: true
Size: 946 Bytes
Versions: 8
Compression:
Stored size: 946 Bytes
Contents
# frozen_string_literal: true module WebSocket module Handshake module Handler class Client < Base private # @see WebSocket::Handshake::Handler::Base#header_line def header_line path = @handshake.path path += '?' + @handshake.query if @handshake.query "GET #{path} HTTP/1.1" end # @see WebSocket::Handshake::Handler::Base#header_handshake_keys def handshake_keys super + @handshake.headers.to_a end # Verify if received header matches with one of the sent ones # @return [Boolean] True if matching. False otherwise(appropriate error is set) def verify_protocol return true if supported_protocols.empty? protos = provided_protocols & supported_protocols raise WebSocket::Error::Handshake::UnsupportedProtocol if protos.empty? true end end end end end
Version data entries
8 entries across 8 versions & 3 rubygems