@ -431,12 +431,14 @@ OPENSSL_EXPORT int BIO_set_mem_eof_return(BIO *bio, int eof_value);
// |BIO_reset| attempts to seek the file pointer to the start of file using
// |lseek|.
# if !defined(OPENSSL_NO_POSIX_IO)
// BIO_s_fd returns a |BIO_METHOD| for file descriptor fds.
OPENSSL_EXPORT const BIO_METHOD * BIO_s_fd ( void ) ;
// BIO_new_fd creates a new file descriptor BIO wrapping |fd|. If |close_flag|
// is non-zero, then |fd| will be closed when the BIO is.
OPENSSL_EXPORT BIO * BIO_new_fd ( int fd , int close_flag ) ;
# endif
// BIO_set_fd sets the file descriptor of |bio| to |fd|. If |close_flag| is
// non-zero then |fd| will be closed when |bio| is. It returns one on success
@ -540,12 +542,14 @@ OPENSSL_EXPORT long BIO_seek(BIO *bio, long offset);
// TODO(davidben): Add separate APIs and fix the internals to use |SOCKET|s
// around rather than rely on int casts.
# if !defined(OPENSSL_NO_SOCK)
OPENSSL_EXPORT const BIO_METHOD * BIO_s_socket ( void ) ;
// BIO_new_socket allocates and initialises a fresh BIO which will read and
// write to the socket |fd|. If |close_flag| is |BIO_CLOSE| then closing the
// BIO will close |fd|. It returns the fresh |BIO| or NULL on error.
OPENSSL_EXPORT BIO * BIO_new_socket ( int fd , int close_flag ) ;
# endif // !OPENSSL_NO_SOCK
// Connect BIOs.
@ -553,6 +557,7 @@ OPENSSL_EXPORT BIO *BIO_new_socket(int fd, int close_flag);
// A connection BIO creates a network connection and transfers data over the
// resulting socket.
# if !defined(OPENSSL_NO_SOCK)
OPENSSL_EXPORT const BIO_METHOD * BIO_s_connect ( void ) ;
// BIO_new_connect returns a BIO that connects to the given hostname and port.
@ -580,12 +585,17 @@ OPENSSL_EXPORT int BIO_set_conn_port(BIO *bio, const char *port_str);
OPENSSL_EXPORT int BIO_set_conn_int_port ( BIO * bio , const int * port ) ;
// BIO_set_nbio sets whether |bio| will use non-blocking I/O operations. It
// returns one on success and zero otherwise.
// returns one on success and zero otherwise. This only works for connect BIOs
// and must be called before |bio| is connected to take effect.
//
// For socket and fd BIOs, callers must configure blocking vs. non-blocking I/O
// using the underlying platform APIs.
OPENSSL_EXPORT int BIO_set_nbio ( BIO * bio , int on ) ;
// BIO_do_connect connects |bio| if it has not been connected yet. It returns
// one on success and <= 0 otherwise.
OPENSSL_EXPORT int BIO_do_connect ( BIO * bio ) ;
# endif // !OPENSSL_NO_SOCK
// Datagram BIOs.