module Roda::RodaPlugins::WebSockets::RequestMethods

Constants

ARGS

Public Instance Methods

websocket(args = ARGS, &block) click to toggle source
# File lib/roda/plugins/websockets.rb, line 52
def websocket(args = ARGS, &block)
  return unless websocket?

  always do
    halt Async::WebSocket::Adapters::Rack.open(env, *args, &block)
  end
end
websocket?() click to toggle source
# File lib/roda/plugins/websockets.rb, line 48
def websocket?
  Async::WebSocket::Adapters::Rack.websocket?(env)
end