diff options
Diffstat (limited to 'erts/emulator/nifs/common/socket_util.h')
-rw-r--r-- | erts/emulator/nifs/common/socket_util.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/erts/emulator/nifs/common/socket_util.h b/erts/emulator/nifs/common/socket_util.h index 398fb40a5a..0a1eb92339 100644 --- a/erts/emulator/nifs/common/socket_util.h +++ b/erts/emulator/nifs/common/socket_util.h @@ -1,7 +1,7 @@ /* * %CopyrightBegin% * - * Copyright Ericsson AB 2018-2019. All Rights Reserved. + * Copyright Ericsson AB 2018-2020. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ * %CopyrightEnd% * * ---------------------------------------------------------------------- - * Purpose : Utility "stuff" for socket and net. + * Purpose : Utility "stuff" for socket and prim_net (nifs). * ---------------------------------------------------------------------- * */ @@ -43,6 +43,22 @@ #define ESOCK_ASSERT(e) ((void) ((e) ? 1 : (ESOCK_ABORT(#e), 0))) extern +BOOLEAN_T esock_get_bool_from_map(ErlNifEnv* env, + ERL_NIF_TERM map, + ERL_NIF_TERM key, + BOOLEAN_T def); +extern +BOOLEAN_T esock_get_int_from_map(ErlNifEnv* env, + ERL_NIF_TERM map, + ERL_NIF_TERM key, + int* val); +extern +BOOLEAN_T esock_get_string_from_map(ErlNifEnv* env, + ERL_NIF_TERM map, + ERL_NIF_TERM key, + char** str); + +extern char* esock_encode_iov(ErlNifEnv* env, int read, struct iovec* iov, |