mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Rename to Kemal::WebSocketHandler
This commit is contained in:
parent
d50d305e99
commit
fbc21b197a
3 changed files with 28 additions and 7 deletions
|
@ -7,5 +7,5 @@ HTTP_METHODS = %w(get post put patch delete)
|
|||
{% end %}
|
||||
|
||||
def ws(path, &block : HTTP::WebSocketHandler::WebSocketSession -> _)
|
||||
Kemal::WebsocketHandler.new path, &block
|
||||
Kemal::WebSocketHandler.new path, &block
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Kemal::WebsocketHandler is used for each define WebSocket route.
|
||||
# Kemal::WebSocketHandler is used for each define WebSocket route.
|
||||
# For each WebSocket route a new handler is created and registered to global handlers.
|
||||
|
||||
class Kemal::WebsocketHandler < HTTP::WebSocketHandler
|
||||
class Kemal::WebSocketHandler < HTTP::WebSocketHandler
|
||||
def initialize(@path, &@proc : WebSocketSession ->)
|
||||
Kemal.config.add_ws_handler self
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue