summaryrefslogtreecommitdiff
path: root/src/platform/posix/posix_socket.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-07-07 00:08:24 -0700
committerGarrett D'Amore <garrett@damore.org>2017-07-07 00:08:24 -0700
commit3730260da3744b549aaa1fe13946a674f924f63c (patch)
tree902866876ee71246a299370cbe8f6580d758525c /src/platform/posix/posix_socket.h
parent3b19940dfcd5d3585b1fb1dcf7915a748ae67289 (diff)
downloadnng-3730260da3744b549aaa1fe13946a674f924f63c.tar.gz
nng-3730260da3744b549aaa1fe13946a674f924f63c.tar.bz2
nng-3730260da3744b549aaa1fe13946a674f924f63c.zip
TCP asynchronous working now.
It turns out that I had to fix a number of subtle asynchronous handling bugs, but now TCP is fully asynchronous. We need to change the high-level dial and listen interfaces to be async as well. Some of the transport APIs have changed here, and I've elected to change what we expose to consumers as endpoints into seperate dialers and listeners. Under the hood they are the same, but it turns out that its helpful to know the intended use of the endpoint at initialization time. Scalability still occasionally hangs on Linux. Investigation pending.
Diffstat (limited to 'src/platform/posix/posix_socket.h')
-rw-r--r--src/platform/posix/posix_socket.h45
1 files changed, 0 insertions, 45 deletions
diff --git a/src/platform/posix/posix_socket.h b/src/platform/posix/posix_socket.h
deleted file mode 100644
index f3fb169c..00000000
--- a/src/platform/posix/posix_socket.h
+++ /dev/null
@@ -1,45 +0,0 @@
-//
-// Copyright 2017 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 PLATFORM_POSIX_SOCKET_H
-#define PLATFORM_POSIX_SOCKET_H
-
-// This file provides declarations for comment socket handling functions on
-// POSIX platforms. We assume that TCP and Unix domain socket (IPC) all
-// work using mostly comment socket handling routines.
-
-#include "core/nng_impl.h"
-
-#include "platform/posix/posix_aio.h"
-
-#include <sys/types.h>
-#include <sys/socket.h>
-
-typedef struct nni_posix_sock nni_posix_sock;
-
-extern int nni_posix_to_sockaddr(struct sockaddr_storage *,
- const nni_sockaddr *);
-extern int nni_posix_from_sockaddr(nni_sockaddr *, const struct sockaddr *);
-extern void nni_posix_sock_aio_send(nni_posix_sock *, nni_aio *);
-extern void nni_posix_sock_aio_recv(nni_posix_sock *, nni_aio *);
-extern int nni_posix_sock_init(nni_posix_sock **);
-extern void nni_posix_sock_fini(nni_posix_sock *);
-extern void nni_posix_sock_shutdown(nni_posix_sock *);
-extern int nni_posix_sock_listen(nni_posix_sock *, const nni_sockaddr *);
-
-// These functions will need to be removed in the future. They are
-// transition functions for now.
-
-extern int nni_posix_sock_send_sync(nni_posix_sock *, nni_iov *, int);
-extern int nni_posix_sock_recv_sync(nni_posix_sock *, nni_iov *, int);
-extern int nni_posix_sock_accept_sync(nni_posix_sock *, nni_posix_sock *);
-extern int nni_posix_sock_connect_sync(nni_posix_sock *,
- const nni_sockaddr *, const nni_sockaddr *);
-
-#endif // PLATFORM_POSIX_SOCKET_H