Add crypto.tls.wrap docs

This commit is contained in:
s0ph0s 2024-02-28 21:22:46 -05:00
parent d372a5820e
commit 451505f5b5

View file

@ -7967,6 +7967,14 @@ function unix.Errno:doc() end
--- differs from the System Five error code.
function unix.Errno:__tostring() end
--- Wraps a plain TCP client socket connection with TLS encryption.
---
--- Initiates the connection handshake immediately.
---@param fd integer
---@param hostname string for validating that the hostname on the certificate matches what is expected
---@return crypto.tls.Connection
---@nodiscard
function crypto.tls.wrap(fd, hostname)
-- CONSTANTS
---@type integer for debug logging level. See `Log`.