net/server_epoll.lua
changeset 11692 3fc564f7441b
parent 11691 153d2fdd97d3
child 11693 f9f6e82fb572
equal deleted inserted replaced
11691:153d2fdd97d3 11692:3fc564f7441b
   731 end
   731 end
   732 
   732 
   733 function interface:defaultoptions()
   733 function interface:defaultoptions()
   734 	if cfg.tcp_keepalive then
   734 	if cfg.tcp_keepalive then
   735 		self:setoption("keepalive", true);
   735 		self:setoption("keepalive", true);
       
   736 		if type(cfg.tcp_keepalive) == "number" then
       
   737 			self:setoption("tcp-keepidle", cfg.tcp_keepalive);
       
   738 		end
   736 	end
   739 	end
   737 end
   740 end
   738 
   741 
   739 function interface:pause()
   742 function interface:pause()
   740 	self:noise("Pause reading");
   743 	self:noise("Pause reading");