forked from wolfSSL/wolfssl
SOCK_LISTEN_MAX_QUEUE, listen arg
This commit is contained in:
@ -852,11 +852,12 @@ static INLINE void tcp_listen(SOCKET_T* sockfd, word16* port, int useAnyAddr,
|
|||||||
if (bind(*sockfd, (const struct sockaddr*)&addr, sizeof(addr)) != 0)
|
if (bind(*sockfd, (const struct sockaddr*)&addr, sizeof(addr)) != 0)
|
||||||
err_sys("tcp bind failed");
|
err_sys("tcp bind failed");
|
||||||
if (!udp) {
|
if (!udp) {
|
||||||
#ifndef WOLFSSL_KEIL_TCP_NET
|
#ifdef WOLFSSL_KEIL_TCP_NET
|
||||||
if (listen(*sockfd, 5) != 0)
|
#define SOCK_LISTEN_MAX_QUEUE 1
|
||||||
#else
|
#else
|
||||||
if (listen(*sockfd, 1) != 0)
|
#define SOCK_LISTEN_MAX_QUEUE 5
|
||||||
#endif
|
#endif
|
||||||
|
if (listen(*sockfd, SOCK_LISTEN_MAX_QUEUE) != 0)
|
||||||
err_sys("tcp listen failed");
|
err_sys("tcp listen failed");
|
||||||
}
|
}
|
||||||
#if !defined(USE_WINDOWS_API) && !defined(WOLFSSL_TIRTOS)
|
#if !defined(USE_WINDOWS_API) && !defined(WOLFSSL_TIRTOS)
|
||||||
|
Reference in New Issue
Block a user