rustls_server_connection_get_sni_hostname

Copy the SNI hostname to buf which can hold up to count bytes, and the length of that hostname in out_n. The string is stored in UTF-8 with no terminating NUL byte. Returns RUSTLS_RESULT_INSUFFICIENT_SIZE if the SNI hostname is longer than count. Returns Ok with *out_n == 0 if there is no SNI hostname available on this connection because it hasn't been processed yet, or because the client did not send SNI. <https://docs.rs/rustls/0.20.0/rustls/server/struct.ServerConnection.html#method.sni_hostname>

extern (C)
rustls_server_connection_get_sni_hostname
(,
ubyte* buf
,
size_t count
,
size_t* out_n
)

Meta