mirror of
https://github.com/wiiu-env/wut.git
synced 2025-01-09 21:19:23 +01:00
32 lines
1.0 KiB
C
32 lines
1.0 KiB
C
#include "wut_socket.h"
|
|
#include <nsysnet/nssl.h>
|
|
|
|
NSSLConnectionHandle
|
|
RPLWRAP(NSSLCreateConnection)(NSSLContextHandle context,
|
|
const char *host,
|
|
int32_t hostLength,
|
|
int32_t options,
|
|
int32_t socket,
|
|
int32_t block);
|
|
|
|
NSSLConnectionHandle
|
|
NSSLCreateConnection(NSSLContextHandle context,
|
|
const char *host,
|
|
int32_t hostLength,
|
|
int32_t options,
|
|
int32_t socket,
|
|
int32_t block)
|
|
{
|
|
socket = __wut_get_nsysnet_fd(socket);
|
|
if (socket == -1) {
|
|
return NSSL_ERROR_INVALID_FD;
|
|
}
|
|
|
|
return RPLWRAP(NSSLCreateConnection)(context,
|
|
host,
|
|
hostLength,
|
|
options,
|
|
socket,
|
|
block);
|
|
}
|