aboutsummaryrefslogtreecommitdiff
path: root/src/core/socket.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-08-12 12:24:54 -0700
committerGarrett D'Amore <garrett@damore.org>2017-08-14 13:43:02 -0700
commit343417234aa3fd86e8ae0b56ae500a1ed3411cfc (patch)
tree728992cfe8c2987d5939026a1f734dcc58b3df18 /src/core/socket.h
parent4fb81f024e5f32a186cd5538574f8e5796980e36 (diff)
downloadnng-343417234aa3fd86e8ae0b56ae500a1ed3411cfc.tar.gz
nng-343417234aa3fd86e8ae0b56ae500a1ed3411cfc.tar.bz2
nng-343417234aa3fd86e8ae0b56ae500a1ed3411cfc.zip
fixes #62 Endpoint close should be synchronous #62
fixes #66 Make pipe and endpoint structures private This changes a number of things, refactoring endpoints and supporting code to keep their internals private, and making endpoint close synchronous. This will allow us to add a consumer facing API for nng_ep_close(), as well as property APIs, etc. While here a bunch of convoluted and dead code was cleaned up.
Diffstat (limited to 'src/core/socket.h')
-rw-r--r--src/core/socket.h15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/core/socket.h b/src/core/socket.h
index 76ebca12..94dd816d 100644
--- a/src/core/socket.h
+++ b/src/core/socket.h
@@ -74,8 +74,6 @@ extern int nni_sock_setopt(nni_sock *, int, const void *, size_t);
extern int nni_sock_getopt(nni_sock *, int, void *, size_t *);
extern int nni_sock_recvmsg(nni_sock *, nni_msg **, nni_time);
extern int nni_sock_sendmsg(nni_sock *, nni_msg *, nni_time);
-extern int nni_sock_dial(nni_sock *, const char *, nni_ep **, int);
-extern int nni_sock_listen(nni_sock *, const char *, nni_ep **, int);
extern uint32_t nni_sock_id(nni_sock *);
extern void nni_sock_lock(nni_sock *);
@@ -84,22 +82,17 @@ extern void nni_sock_unlock(nni_sock *);
extern nni_notify *nni_sock_notify(nni_sock *, int, nng_notify_func, void *);
extern void nni_sock_unnotify(nni_sock *, nni_notify *);
-extern void nni_sock_ep_remove(nni_sock *, nni_ep *);
-
// nni_sock_pipe_add adds the pipe to the socket. It is called by
// the generic pipe creation code. It also adds the socket to the
// ep list, and starts the pipe. It does all these to ensure that
// we have complete success or failure, and there is no point where
// a pipe could wind up orphaned.
-extern int nni_sock_pipe_add(nni_sock *, nni_ep *, nni_pipe *);
-
+extern int nni_sock_pipe_add(nni_sock *, nni_pipe *);
extern void nni_sock_pipe_remove(nni_sock *, nni_pipe *);
+extern int nni_sock_pipe_start(nni_sock *, nni_pipe *p);
-// nni_sock_pipe_ready lets the socket know the pipe is ready for
-// business. This also calls the socket/protocol specific add function,
-// and it may return an error. The reference count should be dropped by
-// nni_sock_pipe_closed.
-extern int nni_sock_pipe_ready(nni_sock *, nni_pipe *);
+extern int nni_sock_ep_add(nni_sock *, nni_ep *);
+extern void nni_sock_ep_remove(nni_sock *, nni_ep *);
// Set error codes for applications. These are only ever
// called from the filter functions in protocols, and thus