47#include <umock/unistd.hpp>
49#ifdef UPnPsdk_HAVE_OPENSSL
50#include <openssl/ssl.h>
58#define SD_RECEIVE 0x00
70#ifdef UPnPsdk_HAVE_OPENSSL
88 if (sock == INVALID_SOCKET)
90 return umock::unistd_h.CLOSE_SOCKET_P(sock);
125 struct sockaddr* foreign_sockaddr);
136#ifdef UPnPsdk_HAVE_OPENSSL
Specifications to be portable with sockets between different platforms.
SOCKET socket
Handle/descriptor to a socket.
int sock_make_blocking(SOCKET sock)
Make socket blocking.
int sock_ssl_connect(SOCKINFO *info)
Associates an SSL object with the socket and begins the client-side SSL/TLS handshake.
SSL * ssl
Information about an ssl connection only filled in incoming requests.
void * ssl
Alternative unused member if OpenSSL isn't compiled in.
int sock_init_with_ip(SOCKINFO *info, SOCKET sockfd, struct sockaddr *foreign_sockaddr)
Calls the sock_init function and assigns the passed in IP address and port to the IP address and port...
sockaddr_storage foreign_sockaddr
Socket address of the remote node only filled in incoming requests.
int sock_close(SOCKET sock)
Closes the socket if it is different from -1.
int sock_make_no_blocking(SOCKET sock)
Make socket non-blocking.
int sock_destroy(SOCKINFO *info, int ShutdownMethod)
Shutsdown the socket using the ShutdownMethod to indicate whether sends and receives on the socket wi...
int sock_read(SOCKINFO *info, char *buffer, size_t bufsize, int *timeoutSecs)
Reads data on socket in sockinfo.
int sock_write(SOCKINFO *info, const char *buffer, size_t bufsize, int *timeoutSecs)
Writes data on the socket in sockinfo.
int sock_init(SOCKINFO *info, SOCKET sockfd)
Assign the passed in socket descriptor to socket descriptor in the SOCKINFO structure.
Additional socket information for connections and ssl.