aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-01-02 14:37:42 -0800
committerGarrett D'Amore <garrett@damore.org>2017-01-02 14:37:42 -0800
commitec2b1275153487fda661942d9b98aab2567b612e (patch)
tree4e1457b1bbf57341ea569013892550a988457e09 /src/core
parentb6374f9d9b07c929522066f27ed9a7a05c6bb23b (diff)
downloadnng-ec2b1275153487fda661942d9b98aab2567b612e.tar.gz
nng-ec2b1275153487fda661942d9b98aab2567b612e.tar.bz2
nng-ec2b1275153487fda661942d9b98aab2567b612e.zip
Begin testing REQ/REP.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/protocol.c4
-rw-r--r--src/core/socket.c7
2 files changed, 11 insertions, 0 deletions
diff --git a/src/core/protocol.c b/src/core/protocol.c
index 8669275a..072cc301 100644
--- a/src/core/protocol.c
+++ b/src/core/protocol.c
@@ -17,9 +17,13 @@
// change, as adding new protocols is not something intended to be done
// outside of the core.
extern nni_proto nni_pair_proto;
+extern nni_proto nni_rep_proto;
+extern nni_proto nni_req_proto;
static nni_proto *protocols[] = {
&nni_pair_proto,
+ &nni_rep_proto,
+ &nni_req_proto,
NULL
};
diff --git a/src/core/socket.c b/src/core/socket.c
index cad4b10a..26ca055e 100644
--- a/src/core/socket.c
+++ b/src/core/socket.c
@@ -361,6 +361,13 @@ nni_sock_proto(nni_sock *sock)
}
+uint16_t
+nni_sock_peer(nni_sock *sock)
+{
+ return (sock->s_proto.proto_peer);
+}
+
+
int
nni_sock_dial(nni_sock *sock, const char *addr, nni_ep **epp, int flags)
{