Close a socket descriptor with OpenSSL error reporting.
Declared in <openssl/bio.h>
<openssl/bio.h>
int BIO_closesocket(int sock);
1 on success, or 0 on failure.