aboutsummaryrefslogtreecommitdiff
path: root/src/core/endpt.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2016-12-22 01:57:10 -0800
committerGarrett D'Amore <garrett@damore.org>2016-12-22 01:57:10 -0800
commit101c1b6a946d9f2f48c6dd89940ae669141e0511 (patch)
tree4da688859d87526d03d724ab1a729c6846650eae /src/core/endpt.h
parentb92672e20420683e73bfc017956ac6ef2b6b793b (diff)
downloadnng-101c1b6a946d9f2f48c6dd89940ae669141e0511.tar.gz
nng-101c1b6a946d9f2f48c6dd89940ae669141e0511.tar.bz2
nng-101c1b6a946d9f2f48c6dd89940ae669141e0511.zip
Use C99 structure initializers FTW. Various other changes.
Diffstat (limited to 'src/core/endpt.h')
-rw-r--r--src/core/endpt.h45
1 files changed, 19 insertions, 26 deletions
diff --git a/src/core/endpt.h b/src/core/endpt.h
index cd46bb61..063dcb7b 100644
--- a/src/core/endpt.h
+++ b/src/core/endpt.h
@@ -1,28 +1,25 @@
-/*
- * Copyright 2016 Garrett D'Amore <garrett@damore.org>
- *
- * 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.
- */
+//
+// Copyright 2016 Garrett D'Amore <garrett@damore.org>
+//
+// 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_ENDPT_H
#define CORE_ENDPT_H
#include "core/transport.h"
-/*
- * NB: This structure is supplied here for use by the CORE. Use of this library
- * OUSIDE of the core is STRICTLY VERBOTEN. NO DIRECT ACCESS BY PROTOCOLS OR
- * TRANSPORTS.
- */
-
+// NB: This structure is supplied here for use by the CORE. Use of this library
+// OUSIDE of the core is STRICTLY VERBOTEN. NO DIRECT ACCESS BY PROTOCOLS OR
+// TRANSPORTS.
struct nng_endpt {
struct nni_endpt_ops ep_ops;
void * ep_tran;
nni_list_node_t ep_sock_node;
- nni_socket_t ep_sock;
+ nni_socket * ep_sock;
const char * ep_addr;
nni_thread_t ep_dialer;
nni_thread_t ep_listener;
@@ -31,15 +28,11 @@ struct nng_endpt {
nni_cond_t ep_cv;
};
-/*
- * This file contains definitions for endpoints.
- */
-
-int nni_endpt_create(nni_endpt_t *, nni_socket_t, const char *);
-void nni_endpt_destroy(nni_endpt_t);
-int nni_endpt_dial(nni_endpt_t, nni_pipe_t *);
-int nni_endpt_listen(nni_endpt_t);
-int nni_endpt_accept(nni_endpt_t, nni_pipe_t *);
-int nni_endpt_close(nni_endpt_t);
+int nni_endpt_create(nni_endpt **, nni_socket *, const char *);
+void nni_endpt_destroy(nni_endpt *);
+int nni_endpt_dial(nni_endpt *, nni_pipe **);
+int nni_endpt_listen(nni_endpt *);
+int nni_endpt_accept(nni_endpt *, nni_pipe **);
+int nni_endpt_close(nni_endpt *);
-#endif /* CORE_ENDPT_H */
+#endif // CORE_ENDPT_H