web: Try enabling kTLS
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user