aboutsummaryrefslogtreecommitdiff
path: root/src/core/tcp.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2019-01-21 22:40:10 -0800
committerGarrett D'Amore <garrett@damore.org>2019-02-16 19:22:27 -0800
commit5cf750697624d4fd63cfe26921209d7c30e1a2d2 (patch)
treebf11695e5f1ec5e400c87da0cc6ff23935a2eeff /src/core/tcp.h
parentca655b9db689ee0e655248b1a9f166b8db6cc984 (diff)
downloadnng-5cf750697624d4fd63cfe26921209d7c30e1a2d2.tar.gz
nng-5cf750697624d4fd63cfe26921209d7c30e1a2d2.tar.bz2
nng-5cf750697624d4fd63cfe26921209d7c30e1a2d2.zip
fixes #872 create unified nng_stream API
This is a major change, and includes changes to use a polymorphic stream API for all transports. There have been related bugs fixed along the way. Additionally the man pages have changed. The old non-polymorphic APIs are removed now. This is a breaking change, but the old APIs were never part of any released public API.
Diffstat (limited to 'src/core/tcp.h')
-rw-r--r--src/core/tcp.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/core/tcp.h b/src/core/tcp.h
new file mode 100644
index 00000000..ac4398d0
--- /dev/null
+++ b/src/core/tcp.h
@@ -0,0 +1,24 @@
+//
+// Copyright 2019 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
+// file was obtained (LICENSE.txt). A copy of the license may also be
+// found online at https://opensource.org/licenses/MIT.
+//
+
+#ifndef CORE_TCP_H
+#define CORE_TCP_H
+
+#include "core/nng_impl.h"
+
+// These are interfaces we use for TCP internally. These are not exposed
+// to the public API.
+
+extern int nni_tcp_dialer_alloc(nng_stream_dialer **, const nng_url *);
+extern int nni_tcp_listener_alloc(nng_stream_listener **, const nng_url *);
+
+// nni_tcp_checkopt is used to validate (generically) options.
+extern int nni_tcp_checkopt(const char *, const void *, size_t, nni_type);
+
+#endif // CORE_TCP_H