Sha256: 1ff18ebc82506151792a9924b84630089e09e22085a1e644812c575658c743d0
Contents?: true
Size: 553 Bytes
Versions: 2
Compression:
Stored size: 553 Bytes
Contents
module WebSocket module Handshake module Handler module Server include Base def host @headers["host"].to_s.split(":")[0].to_s end def port @headers["host"].to_s.split(":")[1] end private def handshake_location location = @secure ? "wss://" : "ws://" location << host location << ":#{port}" if port location << path location << "?#{@query}" if @query location end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
websocket-1.0.1 | lib/websocket/handshake/handler/server.rb |
websocket-1.0.0 | lib/websocket/handshake/handler/server.rb |