Sha256: 447975479ddea2e26bda7c194b9f1cfe03c792e83c72e6011d7cb83a6e04669b
Contents?: true
Size: 1.08 KB
Versions: 7
Compression:
Stored size: 1.08 KB
Contents
module WebSocket module Handshake module Handler # This module and it's descendants are included in client or server handshake in order to extend basic functionality module Base # @see WebSocket::Handshake::Base#to_s def to_s result = [ header_line ] handshake_keys.each do |key| result << key.join(': ') end result << "" result << finishing_line result.join("\r\n") end private # Set first line of text representation according to specification. # @return [String] First line of HTTP header def header_line "" end # Set handshake headers. Provided as array because some protocol version require specific order of fields. # @return [Array] List of headers as arrays [ key, value ] def handshake_keys [] end # Set data to send after headers. In most cases it will be blank data. # @return [String] data def finishing_line "" end end end end end
Version data entries
7 entries across 7 versions & 2 rubygems