Comparison

plugins/mod_http.lua @ 5120:bcabea740c00

mod_{admin_telnet,c2s,component,http,net_multiplex,s2s}: Use module:provides() instead of module:add_item().
author Waqas Hussain <waqas20@gmail.com>
date Wed, 12 Sep 2012 22:22:31 +0500
parent 5093:1ce9e8068dda
child 5180:4ef69555a879
comparison
equal deleted inserted replaced
5119:d868ce990838 5120:bcabea740c00
121 function module.unload() 121 function module.unload()
122 server.remove_host(host); 122 server.remove_host(host);
123 end 123 end
124 end 124 end
125 125
126 module:add_item("net-provider", { 126 module:provides("net", {
127 name = "http"; 127 name = "http";
128 listener = server.listener; 128 listener = server.listener;
129 default_port = 5280; 129 default_port = 5280;
130 multiplex = { 130 multiplex = {
131 pattern = "^[A-Z]"; 131 pattern = "^[A-Z]";
132 }; 132 };
133 }); 133 });
134 134
135 module:add_item("net-provider", { 135 module:provides("net", {
136 name = "https"; 136 name = "https";
137 listener = server.listener; 137 listener = server.listener;
138 default_port = 5281; 138 default_port = 5281;
139 encryption = "ssl"; 139 encryption = "ssl";
140 multiplex = { 140 multiplex = {