MG_ARCH_RTX nits

This commit is contained in:
Sergey Lyubka committed 2022-05-12 15:07:02 +01:00
1 parent 5458252e4a
commit 0294603dfc
6 files changed
+15 -4

No files matched your search

+2
View File
@@ -15,6 +15,8 @@
#include <rl_net.h>
#define MG_IO_SIZE 512
#define MG_SOCK_LISTEN_BACKLOG_SIZE 1
#define MG_ENABLE_CUSTOM_MILLIS 1
typedef int socklen_t;
#define closesocket(x) closesocket(x)
+1 -1
View File
@@ -80,7 +80,7 @@
#endif
#ifndef MG_SOCK_LISTEN_BACKLOG_SIZE
#define MG_SOCK_LISTEN_BACKLOG_SIZE 128
#define MG_SOCK_LISTEN_BACKLOG_SIZE 3
#endif
#ifndef MG_DIRSEP
+2 -1
View File
@@ -406,7 +406,8 @@ static bool mg_socketpair(SOCKET sp[2], union usa usa[2]) {
usa[1] = usa[0];
if ((sock = socket(AF_INET, SOCK_STREAM, 0)) != INVALID_SOCKET &&
bind(sock, &usa[0].sa, len) == 0 && listen(sock, 3) == 0 &&
bind(sock, &usa[0].sa, len) == 0 &&
listen(sock, MG_SOCK_LISTEN_BACKLOG_SIZE) == 0 &&
getsockname(sock, &usa[0].sa, &len) == 0 &&
(sp[0] = socket(AF_INET, SOCK_STREAM, 0)) != INVALID_SOCKET &&
connect(sp[0], &usa[0].sa, len) == 0 &&