Comparison

net/server_epoll.lua @ 10983:0862325842ec

net.server_epoll: Signal API-compatibilty with util.timer Reduces the overhead of having both util.timer and the timer handling here, since they are very similar and now API-compatible.
author Kim Alvefur <zash@zash.se>
date Mon, 29 Jun 2020 17:13:05 +0200
parent 10982:276f16101d59
child 10984:69ed4764edda
comparison
equal deleted inserted replaced
10982:276f16101d59 10983:0862325842ec
894 return { 894 return {
895 get_backend = function () return "epoll"; end; 895 get_backend = function () return "epoll"; end;
896 addserver = addserver; 896 addserver = addserver;
897 addclient = addclient; 897 addclient = addclient;
898 add_task = addtimer; 898 add_task = addtimer;
899 timer = {
900 -- API-compatible with util.timer
901 add_task = addtimer;
902 stop = closetimer;
903 reschedule = reschedule;
904 };
899 listen = listen; 905 listen = listen;
900 loop = loop; 906 loop = loop;
901 closeall = closeall; 907 closeall = closeall;
902 setquitting = setquitting; 908 setquitting = setquitting;
903 wrapclient = wrapclient; 909 wrapclient = wrapclient;