g_lua.registerMember("weight", &DownstreamState::weight);
g_lua.registerMember("order", &DownstreamState::order);
+ g_lua.writeFunction("infolog", [](const string& arg) {
+ infolog("%s", arg);
+ });
+ g_lua.writeFunction("errlog", [](const string& arg) {
+ errlog("%s", arg);
+ });
+ g_lua.writeFunction("warnlog", [](const string& arg) {
+ warnlog("%s", arg);
+ });
+
+
g_lua.writeFunction("show", [](const string& arg) {
g_outputBuffer+=arg;
g_outputBuffer+="\n";
We neglect to do recvfromto() on 0.0.0.0
Receiver is currently singlethreaded (not that bad actually)
lack of help()
- we offer no way to log from Lua
*/
namespace po = boost::program_options;
addLocal("0.0.0.0:5200")
setKey("MXNeLFWHUe4363BBKrY06cAsH8NWNb+Se2eXU5+Bb74=")
+warnlog(string.format("Script starting %s", "up!"))
+
-- define the good servers
newServer("8.8.8.8", 2) -- 2 qps
newServer("8.8.4.4", 2)