Custom mg_set_non_blocking_mode() implementation #1410
dmitry-kandiner
started this conversation in
Feature requests
Replies: 2 comments
-
Resolved here: #1411 |
Beta Was this translation helpful? Give feedback.
0 replies
-
For the sake of record. SDK's version of #include <core/bsd_socket.h>
#define F_SETFD 12345
#define FD_CLOEXEC 0
static inline int mg_fcntl(int fd, int cmd, ...) {
if (cmd == F_GETFL) { uint32_t opt; fcntl(fd, cmd, &opt); return opt; }
...
}
#define fcntl mg_fcntl |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It would be nice to have an option for custom mg_set_non_blocking_mode() implementation - some architectures have non-standard way for doing so. For instance, Cyclone TCP stack implementation of fcntl() requires three parameters: a socket, a command and a pointer to the command parameters.
Beta Was this translation helpful? Give feedback.
All reactions