forked from wolfSSL/wolfssl
Merge pull request #1782 from JacobBarthelmeh/SanityChecks
refactor CloseSocket for WOLFSSL_BIO free with USER IO
This commit is contained in:
@@ -222,21 +222,6 @@
|
|||||||
#endif /* USE_WINDOWS_API */
|
#endif /* USE_WINDOWS_API */
|
||||||
|
|
||||||
|
|
||||||
#ifdef USE_WINDOWS_API
|
|
||||||
#define CloseSocket(s) closesocket(s)
|
|
||||||
#define StartTCP() { WSADATA wsd; WSAStartup(0x0002, &wsd); }
|
|
||||||
#elif defined(WOLFSSL_MDK_ARM) || defined(WOLFSSL_KEIL_TCP_NET)
|
|
||||||
extern int closesocket(int);
|
|
||||||
#define CloseSocket(s) closesocket(s)
|
|
||||||
#define StartTCP()
|
|
||||||
#else
|
|
||||||
#define CloseSocket(s) close(s)
|
|
||||||
#define StartTCP()
|
|
||||||
#ifdef FREERTOS_TCP_WINSIM
|
|
||||||
extern int close(int);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEVKITPRO
|
#ifdef DEVKITPRO
|
||||||
@@ -319,6 +304,28 @@ WOLFSSL_API int wolfIO_Recv(SOCKET_T sd, char *buf, int sz, int rdFlags);
|
|||||||
#endif /* USE_WOLFSSL_IO || HAVE_HTTP_CLIENT */
|
#endif /* USE_WOLFSSL_IO || HAVE_HTTP_CLIENT */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef USE_WINDOWS_API
|
||||||
|
#ifndef CloseSocket
|
||||||
|
#define CloseSocket(s) closesocket(s)
|
||||||
|
#endif
|
||||||
|
#define StartTCP() { WSADATA wsd; WSAStartup(0x0002, &wsd); }
|
||||||
|
#elif defined(WOLFSSL_MDK_ARM) || defined(WOLFSSL_KEIL_TCP_NET)
|
||||||
|
#ifndef CloseSocket
|
||||||
|
extern int closesocket(int);
|
||||||
|
#define CloseSocket(s) closesocket(s)
|
||||||
|
#endif
|
||||||
|
#define StartTCP()
|
||||||
|
#else
|
||||||
|
#ifndef CloseSocket
|
||||||
|
#define CloseSocket(s) close(s)
|
||||||
|
#endif
|
||||||
|
#define StartTCP()
|
||||||
|
#ifdef FREERTOS_TCP_WINSIM
|
||||||
|
extern int close(int);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
WOLFSSL_API int BioSend(WOLFSSL* ssl, char *buf, int sz, void *ctx);
|
WOLFSSL_API int BioSend(WOLFSSL* ssl, char *buf, int sz, void *ctx);
|
||||||
WOLFSSL_API int BioReceive(WOLFSSL* ssl, char* buf, int sz, void* ctx);
|
WOLFSSL_API int BioReceive(WOLFSSL* ssl, char* buf, int sz, void* ctx);
|
||||||
#if defined(USE_WOLFSSL_IO)
|
#if defined(USE_WOLFSSL_IO)
|
||||||
|
Reference in New Issue
Block a user