Manual Pages for UNIX Darwin command on man BIO_s_socket
MyWebUniversity

Manual Pages for UNIX Darwin command on man BIO_s_socket

BIOssocket(3) OpenSSL BIOssocket(3)

NAME

BIOssocket, BIOnewsocket - socket BIO

SYNOPSIS

#include

BIOMETHOD *BIOssocket(void); long BIOsetfd(BIO *b, int fd, long closeflag); long BIOgetfd(BIO *b, int *c); BIO *BIOnewsocket(int sock, int closeflag);

DESCRIPTION

BIOssocket() returns the socket BIO method. This is a wrapper round the platform's socket routines. BIOread() and BIOwrite() read or write the underlying socket. BIOputs() is supported but BIOgets() is not. If the close flag is set then the socket is shut down and closed when the BIO is freed. BIOsetfd() sets the socket of BIO bb to ffdd and the close flag to cclloosseeffllaagg. BIOgetfd() places the socket in cc if it is not NULL, it also returns the socket. If cc is not NULL it should be of type (int *). BIOnewsocket() returns a socket BIO using ssoocckk and cclloosseeffllaagg. NNOOTTEESS Socket BIOs also support any relevant functionality of file descriptor BIOs. The reason for having separate file descriptor and socket BIOs is that on some platforms sockets are not file descriptors and use distinct I/O routines, Windows is one such platform. Any code mixing the two will not work on all platforms. BIOsetfd() and BIOgetfd() are macros.

RETURN VALUES

BIOssocket() returns the socket BIO method. BIOsetfd() always returns 1.

BIOgetfd() returns the socket or -1 if the BIO has not been

initialized. BIOnewsocket() returns the newly allocated BIO or NULL is an error occurred.

SEE ALSO

TBA

0.9.7l 2000-10-19 BIOssocket(3)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™