diff options
Diffstat (limited to 'erts/emulator/nifs/common/socket_nif.c')
-rw-r--r-- | erts/emulator/nifs/common/socket_nif.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/erts/emulator/nifs/common/socket_nif.c b/erts/emulator/nifs/common/socket_nif.c index 843543b42b..905e04848c 100644 --- a/erts/emulator/nifs/common/socket_nif.c +++ b/erts/emulator/nifs/common/socket_nif.c @@ -361,6 +361,7 @@ typedef union { #define SOCKET_OPT_SOCK_KEEPALIVE 9 #define SOCKET_OPT_SOCK_LINGER 10 +#define SOCKET_OPT_SOCK_PRIORITY 16 #define SOCKET_OPT_SOCK_REUSEADDR 21 #define SOCKET_OPT_IP_RECVTOS 0 @@ -3431,6 +3432,20 @@ BOOLEAN_T eoptval2optval_socket(ErlNifEnv* env, break; #endif +#if defined(SO_PRIORITY) + case SOCKET_OPT_SOCK_PRIORITY: + if (GET_INT(env, eVal, &valP->u.intVal)) { + valP->tag = SOCKET_OPT_VALUE_INT; + *opt = SO_PRIORITY; + return TRUE; + } else { + *opt = -1; + valP->tag = SOCKET_OPT_VALUE_UNDEF; + return FALSE; + } + break; +#endif + #if defined(SO_REUSEADDR) case SOCKET_OPT_SOCK_REUSEADDR: { |