mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
add network.get_total_upload, .get_total_download
This commit is contained in:
parent
9b73e78a37
commit
46628263d1
3 changed files with 39 additions and 12 deletions
|
|
@ -159,9 +159,19 @@ static int l_is_serveropen(lua::State* L) {
|
|||
return lua::pushboolean(L, false);
|
||||
}
|
||||
|
||||
static int l_get_total_upload(lua::State* L) {
|
||||
return lua::pushinteger(L, engine->getNetwork().getTotalUpload());
|
||||
}
|
||||
|
||||
static int l_get_total_download(lua::State* L) {
|
||||
return lua::pushinteger(L, engine->getNetwork().getTotalDownload());
|
||||
}
|
||||
|
||||
const luaL_Reg networklib[] = {
|
||||
{"get", lua::wrap<l_get>},
|
||||
{"get_binary", lua::wrap<l_get_binary>},
|
||||
{"get_total_upload", lua::wrap<l_get_total_upload>},
|
||||
{"get_total_download", lua::wrap<l_get_total_download>},
|
||||
{"__open", lua::wrap<l_open>},
|
||||
{"__closeserver", lua::wrap<l_closeserver>},
|
||||
{"__connect", lua::wrap<l_connect>},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue