From 3730260da3744b549aaa1fe13946a674f924f63c Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Fri, 7 Jul 2017 00:08:24 -0700 Subject: 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. --- src/platform/posix/posix_socket.h | 45 --------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 src/platform/posix/posix_socket.h (limited to 'src/platform/posix/posix_socket.h') 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 -// -// 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 -#include - -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 -- cgit v1.2.3-70-g09d2