aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/nifs/common/socket_util.h
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2018-09-28 18:40:08 +0200
committerMicael Karlberg <[email protected]>2018-09-28 18:40:08 +0200
commit1c412c62ba3be17b7a818f264049a7ee7942351e (patch)
tree675494d373a04c6b15ff0fc19b24725d5f95c986 /erts/emulator/nifs/common/socket_util.h
parent0b56a98366fc152c0fa5d5398220ac31866114d5 (diff)
downloadotp-1c412c62ba3be17b7a818f264049a7ee7942351e.tar.gz
otp-1c412c62ba3be17b7a818f264049a7ee7942351e.tar.bz2
otp-1c412c62ba3be17b7a818f264049a7ee7942351e.zip
[socket-nif] Add support for socket (level otp) buffer options
Add support for otp level socket options rcvbuf, rcvctrlbuf and sndctrlbuf. These options define default sizes for these buffers. The 'rcvbuf' is used when receiving messages when calling the recv, recvfrom and recvmsg functions. The 'rcvctrlbuf' is used for the control message header info when calling the recvmsg function. The 'sndctrlbuf' is used for the control message header info when calling the sendmsg function. OTP-14831
Diffstat (limited to 'erts/emulator/nifs/common/socket_util.h')
-rw-r--r--erts/emulator/nifs/common/socket_util.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/erts/emulator/nifs/common/socket_util.h b/erts/emulator/nifs/common/socket_util.h
index a38453e238..1b5d003155 100644
--- a/erts/emulator/nifs/common/socket_util.h
+++ b/erts/emulator/nifs/common/socket_util.h
@@ -158,6 +158,12 @@ char* esock_encode_protocol(ErlNifEnv* env,
ERL_NIF_TERM* eProtocol);
extern
+char* esock_decode_bufsz(ErlNifEnv* env,
+ ERL_NIF_TERM eVal,
+ size_t defSz,
+ size_t* sz);
+
+extern
BOOLEAN_T esock_decode_string(ErlNifEnv* env,
const ERL_NIF_TERM eString,
char** stringP);