EMILUA(3em)
π NAME π
okay so this is the EMILUA(3em) page β the Emilua reference, bestie. And Emilua is literally the Lua execution engine. That's the whole name vibe: Emilua - Lua execution engine. It's giving highkey iconic main character energy, ngl. π
π¦ SYNOPSIS π¦
no cap, here's the synopsis in all its code-y glory β exactly as written:
local s = tls.socket.new(ip.tcp.dial('www.example.com:https'))
s:client_handshake()
s = http.socket.new(s)
local req = http.request.new()
local res = http.response.new()
req.headers.host = 'www.example.com'
s:write_request(req)
s:read_response(res)
π FUNCTIONS π
β¨ new(sock: ip.tcp.socket[, tls_ctx: tls.context]) β tls.socket
Constructor. Slay.
If tls_ctx is not provided, a per-VM β generated on first use β default one will be used. That's the tea. β
πΈ client_handshake(self)
Perform the TLS client handshake and suspend current fiber until operation finishes. Periodt. π«Ά
π¦ server_handshake(self)
Perform the TLS server handshake and suspend current fiber until operation finishes. Iconic. β¨
π read_some(self, buffer: byte_span) β integer
Read data from the stream socket and blocks current fiber until it completes or errs.
Returns the number of bytes read. No cap. π
π write_some(self, buffer: byte_span) β integer
Write data to the stream socket and blocks current fiber until it completes or errs.
Returns the number of bytes written. Fr fr. βοΈ
π set_server_name(self, hostname: string)
Sets the server name indication. Cute and to the point. π
π set_verify_callback(self, callback: string[, callback_options...])
Set the callback used to verify peer certificates.
For now only one callback is supported:
"host_name_verification"βcallback_optionswill be a single string containing the host name.
iykyk. π§
β set_verify_depth(self, depth: integer)
Set the peer verification depth. That's it, that's the function. π
π₯ set_verify_mode(self, mode: string)
Set the peer verification mode.
mode might be one of the following:
"none"."peer"."fail_if_no_peer_cert"."client_once".
ngl bestie, these mode strings are the whole vibe check β keep them exactly as written. π«Ά
mwah π β this page's source/version is Emilua 0.12.1-nixpkgs1, dated 1980-01-01. That's the manual, bestie. Slay, and read the docs. πβ¨
π¦ where this page comes from
- nixos 26.05: emilua 0.12.1
- nixpkgs unstable: emilua 0.12.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms