Software /
code /
prosody
Comparison
net/server_epoll.lua @ 11686:f4c3dcc907d8
net.server_epoll: Add an (empty) method for setting socket options
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 14 Jul 2021 22:06:24 +0200 |
parent | 11685:247561bf6fca |
child | 11687:153d2fdd97d3 |
comparison
equal
deleted
inserted
replaced
11685:247561bf6fca | 11686:f4c3dcc907d8 |
---|---|
707 self:pausefor(cfg.accept_retry_interval); | 707 self:pausefor(cfg.accept_retry_interval); |
708 return; | 708 return; |
709 end | 709 end |
710 local client = wrapsocket(conn, self, nil, self.listeners); | 710 local client = wrapsocket(conn, self, nil, self.listeners); |
711 client:debug("New connection %s on server %s", client, self); | 711 client:debug("New connection %s on server %s", client, self); |
712 client:defaultoptions(); | |
712 if self.tls_direct then | 713 if self.tls_direct then |
713 client:add(true, true); | 714 client:add(true, true); |
714 client:inittls(self.tls_ctx, true); | 715 client:inittls(self.tls_ctx, true); |
715 else | 716 else |
716 client:add(true, false); | 717 client:add(true, false); |
720 end | 721 end |
721 | 722 |
722 -- Initialization for outgoing connections | 723 -- Initialization for outgoing connections |
723 function interface:init() | 724 function interface:init() |
724 self:setwritetimeout(cfg.connect_timeout); | 725 self:setwritetimeout(cfg.connect_timeout); |
726 self:defaultoptions(); | |
725 return self:add(true, true); | 727 return self:add(true, true); |
728 end | |
729 | |
730 -- luacheck: ignore 212/self | |
731 function interface:defaultoptions() | |
726 end | 732 end |
727 | 733 |
728 function interface:pause() | 734 function interface:pause() |
729 self:noise("Pause reading"); | 735 self:noise("Pause reading"); |
730 return self:set(false); | 736 return self:set(false); |