Software / code / prosody
Comparison
net/http/server.lua @ 5439:bd7b314c2301
net.http.server: add API to allow firing events directly on the server.
| author | Marco Cirillo <maranda@lightwitch.org> |
|---|---|
| date | Sun, 07 Apr 2013 12:23:29 +0000 |
| parent | 5404:ae9a47e579d7 |
| child | 5487:03ddf2375d48 |
comparison
equal
deleted
inserted
replaced
| 5438:5032b3b5b556 | 5439:bd7b314c2301 |
|---|---|
| 282 hosts[host] = nil; | 282 hosts[host] = nil; |
| 283 end | 283 end |
| 284 function _M.set_default_host(host) | 284 function _M.set_default_host(host) |
| 285 default_host = host; | 285 default_host = host; |
| 286 end | 286 end |
| 287 function _M.fire_event(event, ...) | |
| 288 return events.fire_event(event, ...); | |
| 289 end | |
| 287 | 290 |
| 288 _M.listener = listener; | 291 _M.listener = listener; |
| 289 _M.codes = codes; | 292 _M.codes = codes; |
| 290 _M._events = events; | 293 _M._events = events; |
| 291 return _M; | 294 return _M; |