web: Try enabling kTLS

This commit is contained in:
2026-06-24 13:15:23 +02:00
parent 9f9ae95f54
commit d2719a77f0
2 changed files with 11 additions and 2 deletions

View File

@@ -361,6 +361,10 @@ fn maybeInitSsl(self: *const Server, fd: FileDescriptor) !?*openssl.Ssl {
log.debug("Accepting SSL layer.", .{});
try ssl.accept();
log.debug("Accepted SSL layer.", .{});
const opt = std.mem.toBytes(@as(c_int, 1));
if (fd.setsockopt(linux.SOL.TLS, 3, &opt)) { // TLS_TX_ZEROCOPY_RO
log.debug("Enabled zero-copy on sendfile.", .{});
} else |_| {}
return ssl;
} else {
return null;