stream_socket_enable_crypto()
function stream_socket_enable_crypto(resource $stream, bool $enable, int $crypto_method = null, resource $session_stream = null): bool
Turns encryption on/off on an already connected socket.
Parameters:
$stream(resource)$enable(bool)$crypto_method(int), defaultnull, optional$session_stream(resource), defaultnull, optional
Returns: bool
Availability
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported — declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/filesystem/stream_socket_enable_crypto.rs).
No examples yet — check examples/ and showcases/ for usage patterns.
Internals
For how stream_socket_enable_crypto is implemented in the compiler, see the internals page.