summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/cutils/sockets.h1
-rw-r--r--libcutils/Android.bp1
-rw-r--r--libcutils/socket_loopback_client_unix.c40
3 files changed, 0 insertions, 42 deletions
diff --git a/include/cutils/sockets.h b/include/cutils/sockets.h
index a93c8eaa4..1f7eedde8 100644
--- a/include/cutils/sockets.h
+++ b/include/cutils/sockets.h
@@ -84,7 +84,6 @@ int android_get_control_socket(const char* name);
84 * 84 *
85 * These functions return INVALID_SOCKET (-1) on failure for all platforms. 85 * These functions return INVALID_SOCKET (-1) on failure for all platforms.
86 */ 86 */
87int socket_loopback_client(int port, int type);
88cutils_socket_t socket_network_client(const char* host, int port, int type); 87cutils_socket_t socket_network_client(const char* host, int port, int type);
89int socket_network_client_timeout(const char* host, int port, int type, 88int socket_network_client_timeout(const char* host, int port, int type,
90 int timeout, int* getaddrinfo_error); 89 int timeout, int* getaddrinfo_error);
diff --git a/libcutils/Android.bp b/libcutils/Android.bp
index 955c0ecd6..2e7c8fc25 100644
--- a/libcutils/Android.bp
+++ b/libcutils/Android.bp
@@ -23,7 +23,6 @@ libcutils_nonwindows_sources = [
23 "socket_inaddr_any_server_unix.c", 23 "socket_inaddr_any_server_unix.c",
24 "socket_local_client_unix.c", 24 "socket_local_client_unix.c",
25 "socket_local_server_unix.c", 25 "socket_local_server_unix.c",
26 "socket_loopback_client_unix.c",
27 "socket_loopback_server_unix.c", 26 "socket_loopback_server_unix.c",
28 "socket_network_client_unix.c", 27 "socket_network_client_unix.c",
29 "sockets_unix.cpp", 28 "sockets_unix.cpp",
diff --git a/libcutils/socket_loopback_client_unix.c b/libcutils/socket_loopback_client_unix.c
deleted file mode 100644
index 137e369c2..000000000
--- a/libcutils/socket_loopback_client_unix.c
+++ /dev/null
@@ -1,40 +0,0 @@
1/*
2** Copyright 2006, The Android Open Source Project
3**
4** Licensed under the Apache License, Version 2.0 (the "License");
5** you may not use this file except in compliance with the License.
6** You may obtain a copy of the License at
7**
8** http://www.apache.org/licenses/LICENSE-2.0
9**
10** Unless required by applicable law or agreed to in writing, software
11** distributed under the License is distributed on an "AS IS" BASIS,
12** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13** See the License for the specific language governing permissions and
14** limitations under the License.
15*/
16
17#include <errno.h>
18#include <stddef.h>
19#include <stdlib.h>
20#include <string.h>
21#include <unistd.h>
22
23#if !defined(_WIN32)
24#include <sys/socket.h>
25#include <sys/select.h>
26#include <sys/types.h>
27#include <netinet/in.h>
28#endif
29
30#include <cutils/sockets.h>
31
32/* Connect to port on the loopback IP interface. type is
33 * SOCK_STREAM or SOCK_DGRAM.
34 * return is a file descriptor or -1 on error
35 */
36int socket_loopback_client(int port, int type)
37{
38 return socket_network_client("localhost", port, type);
39}
40