Software /
code /
prosody
Comparison
net/http/server.lua @ 5504:b760b5f0c2b0
net.server.http: Add a comment
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 22 Apr 2013 12:25:00 +0100 |
parent | 5503:91052e59375c |
child | 5505:0b6a99e6c1b1 |
comparison
equal
deleted
inserted
replaced
5503:91052e59375c | 5504:b760b5f0c2b0 |
---|---|
29 | 29 |
30 local recent_wildcard_events, max_cached_wildcard_events = {}, 10000; | 30 local recent_wildcard_events, max_cached_wildcard_events = {}, 10000; |
31 | 31 |
32 local event_map = events._event_map; | 32 local event_map = events._event_map; |
33 setmetatable(events._handlers, { | 33 setmetatable(events._handlers, { |
34 -- Called when firing an event that doesn't exist (but may match a wildcard handler) | |
34 __index = function (handlers, curr_event) | 35 __index = function (handlers, curr_event) |
35 if is_wildcard_event(curr_event) then return; end -- Wildcard events cannot be fired | 36 if is_wildcard_event(curr_event) then return; end -- Wildcard events cannot be fired |
36 -- Find all handlers that could match this event, sort them | 37 -- Find all handlers that could match this event, sort them |
37 -- and then put the array into handlers[curr_event] (and return it) | 38 -- and then put the array into handlers[curr_event] (and return it) |
38 local matching_handlers_set = {}; | 39 local matching_handlers_set = {}; |