From 45f455064b5704f3d5ed8ecf9f197a18fe72ee59 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Wed, 4 Apr 2018 12:37:34 -0700 Subject: fixes #331 replace NNG_OPT_RAW option with constructor This makes the raw mode something that is immutable, determined at socket construction. This is an enabling change for the separate context support coming soon. As a result, this is an API breaking change for users of the raw mode option (NNG_OPT_RAW). There aren't many of them out there. Cooked mode is entirely unaffected. There are changes to tests and documentation included. --- src/protocol/reqrep0/req.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/protocol/reqrep0/req.h') diff --git a/src/protocol/reqrep0/req.h b/src/protocol/reqrep0/req.h index 99c9bf62..392c7932 100644 --- a/src/protocol/reqrep0/req.h +++ b/src/protocol/reqrep0/req.h @@ -1,6 +1,6 @@ // -// Copyright 2017 Garrett D'Amore -// Copyright 2017 Capitar IT Group BV +// Copyright 2018 Staysail Systems, Inc. +// Copyright 2018 Capitar IT Group BV // // This software is supplied under the terms of the MIT License, a // copy of which should be located in the distribution where this @@ -16,10 +16,14 @@ extern "C" { #endif NNG_DECL int nng_req0_open(nng_socket *); +NNG_DECL int nng_req0_open_raw(nng_socket *); #ifndef nng_req_open #define nng_req_open nng_req0_open #endif +#ifndef nng_req_open_raw +#define nng_req_open_raw nng_req0_open_raw +#endif #define NNG_OPT_REQ_RESENDTIME "req:resend-time" -- cgit v1.2.3-70-g09d2