aboutsummaryrefslogtreecommitdiff
path: root/src/sp/protocol/reqrep0/xreq_test.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2025-01-01 12:44:02 -0800
committerGarrett D'Amore <garrett@damore.org>2025-01-01 12:44:02 -0800
commit0d23af92531b7c0dd6d7b74c73c1a8c4811c7d13 (patch)
tree2dc9ded3dfc724df42a360a9f2de359f406e537f /src/sp/protocol/reqrep0/xreq_test.c
parentf8a2abaf931557030fd6e6683617c6a7877eebf7 (diff)
downloadnng-0d23af92531b7c0dd6d7b74c73c1a8c4811c7d13.tar.gz
nng-0d23af92531b7c0dd6d7b74c73c1a8c4811c7d13.tar.bz2
nng-0d23af92531b7c0dd6d7b74c73c1a8c4811c7d13.zip
protocols: move content from the protocols to nng.h
This should simplify things for developers. Just one header to include in most cases now.
Diffstat (limited to 'src/sp/protocol/reqrep0/xreq_test.c')
-rw-r--r--src/sp/protocol/reqrep0/xreq_test.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/sp/protocol/reqrep0/xreq_test.c b/src/sp/protocol/reqrep0/xreq_test.c
index b51de556..28c79a26 100644
--- a/src/sp/protocol/reqrep0/xreq_test.c
+++ b/src/sp/protocol/reqrep0/xreq_test.c
@@ -1,5 +1,5 @@
//
-// Copyright 2024 Staysail Systems, Inc. <info@staysail.tech>
+// Copyright 2025 Staysail Systems, Inc. <info@staysail.tech>
//
// This software is supplied under the terms of the MIT License, a
// copy of which should be located in the distribution where this
@@ -10,6 +10,11 @@
#include "nng/nng.h"
#include <nuts.h>
+#define REQ0_SELF 0x30
+#define REQ0_PEER 0x31
+#define REQ0_SELF_NAME "req"
+#define REQ0_PEER_NAME "rep"
+
static void
test_xreq_identity(void)
{
@@ -24,10 +29,10 @@ test_xreq_identity(void)
NUTS_PASS(nng_socket_proto_name(s, &n1));
NUTS_PASS(nng_socket_peer_name(s, &n2));
NUTS_CLOSE(s);
- NUTS_TRUE(p1 == NNG_REQ0_SELF);
- NUTS_TRUE(p2 == NNG_REQ0_PEER);
- NUTS_MATCH(n1, NNG_REQ0_SELF_NAME);
- NUTS_MATCH(n2, NNG_REQ0_PEER_NAME);
+ NUTS_TRUE(p1 == REQ0_SELF);
+ NUTS_TRUE(p2 == REQ0_PEER);
+ NUTS_MATCH(n1, REQ0_SELF_NAME);
+ NUTS_MATCH(n2, REQ0_PEER_NAME);
}
static void