Sortix nightly manual
This manual documents Sortix nightly, a development build that has not been officially released. You can instead view this document in the latest official manual.
NAME
SSL_write_ex, SSL_write — write bytes to a TLS connectionSYNOPSIS
#include <openssl/ssl.h>SSL_write_ex(SSL *ssl, const void *buf, size_t num, size_t *written);
SSL_write(SSL *ssl, const void *buf, int num);
DESCRIPTION
SSL_write_ex() and SSL_write() write num bytes from the buffer buf into the specified ssl connection. On success SSL_write_ex() stores the number of bytes written in *written.RETURN VALUES
SSL_write_ex() returns 1 for success or 0 for failure. Success means that all requested application data bytes have been written to the TLS connection or, if SSL_MODE_ENABLE_PARTIAL_WRITE is in use, at least one application data byte has been written to the TLS connection. Failure means that not all the requested bytes have been written yet (if SSL_MODE_ENABLE_PARTIAL_WRITE is not in use) or no bytes could be written to the TLS connection (if SSL_MODE_ENABLE_PARTIAL_WRITE is in use). Failures can be retryable (e.g. the network write buffer has temporarily filled up) or non-retryable (e.g. a fatal network error). In the event of a failure, call SSL_get_error(3) to find out the reason which indicates whether the call is retryable or not.- >0
- The write operation was successful. The return value is the number of bytes actually written to the TLS connection.
- 0
- The write operation was not successful. Probably the underlying connection was closed. Call SSL_get_error(3) with the return value to find out whether an error occurred or the connection was shut down cleanly (SSL_ERROR_ZERO_RETURN).
- <0
- The write operation was not successful, because either an error occurred or action must be taken by the calling process. Call SSL_get_error(3) with the return value to find out the reason.