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
BIO_s_fd, BIO_set_fd, BIO_get_fd, BIO_new_fd, BIO_fd_non_fatal_error, BIO_fd_should_retry — file descriptor BIOSYNOPSIS
#include <openssl/bio.h>BIO_s_fd(void);
BIO_set_fd(BIO *b, int fd, long close_flag);
BIO_get_fd(BIO *b, int *c);
BIO_new_fd(int fd, int close_flag);
BIO_fd_non_fatal_error(int errnum);
BIO_fd_should_retry(int retval);
DESCRIPTION
BIO_s_fd() returns the file descriptor BIO method. This is a wrapper around the platform's file descriptor routines such as read(2) and write(2).
cmd constant |
corresponding macro |
BIO_C_FILE_SEEK | BIO_seek(3) |
BIO_C_FILE_TELL | BIO_tell(3) |
BIO_C_GET_FD | BIO_get_fd() |
BIO_C_SET_FD | BIO_set_fd() |
BIO_CTRL_GET_CLOSE | BIO_get_close(3) |
BIO_CTRL_RESET | BIO_reset(3) |
BIO_CTRL_SET_CLOSE | BIO_set_close(3) |
RETURN VALUES
BIO_s_fd() returns the file descriptor BIO method.EXAMPLES
This is a file descriptor BIO version of "Hello World":BIO *out; out = BIO_new_fd(fileno(stdout), BIO_NOCLOSE); BIO_printf(out, "Hello World\n"); BIO_free(out);