Software /
code /
prosody
Comparison
net/server_epoll.lua @ 11673:3ab8496579f1
net.server_epoll: Start TLS handshake immediately on newly accepted connections
Since TLS is a client-first protocol there is a chance that the
ClientHello message is available already. TLS Fast Open and/or the
TCP_DEFER_ACCEPT socket option would increase that chance.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 13 Jul 2021 14:20:26 +0200 |
parent | 11672:79f8e29e88a0 |
child | 11674:8253f6a30afc |
comparison
equal
deleted
inserted
replaced
11672:79f8e29e88a0 | 11673:3ab8496579f1 |
---|---|
701 if self.tls_direct then | 701 if self.tls_direct then |
702 client:add(true, true); | 702 client:add(true, true); |
703 if client:inittls(self.tls_ctx) then | 703 if client:inittls(self.tls_ctx) then |
704 client:setreadtimeout(cfg.ssl_handshake_timeout); | 704 client:setreadtimeout(cfg.ssl_handshake_timeout); |
705 client:setwritetimeout(cfg.ssl_handshake_timeout); | 705 client:setwritetimeout(cfg.ssl_handshake_timeout); |
706 client:tlshandshake(); | |
706 end | 707 end |
707 else | 708 else |
708 client:add(true, false); | 709 client:add(true, false); |
709 client:onconnect(); | 710 client:onconnect(); |
710 client:onreadable(); | 711 client:onreadable(); |