Add more documentation

This commit is contained in:
Sdogruyol 2015-12-18 22:45:28 +02:00
parent b8e7ad2577
commit 20ef2b2927
2 changed files with 6 additions and 1 deletions

View File

@ -1,7 +1,9 @@
require "http/server"
require "uri"
# Handles the routes
# Kemal::Handler is the main handler which handles all the HTTP requests. Routing, parsing, rendering e.g
# are done in this handler.
class Kemal::Handler < HTTP::Handler
INSTANCE = new

View File

@ -1,3 +1,6 @@
# 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
def initialize(@path, &@proc : WebSocketSession ->)
Kemal.config.add_ws_handler self