Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dd92a0a8 authored by Elliott Hughes's avatar Elliott Hughes
Browse files

Remove socket_loopback_client.

Bug: http://b/31537253
Test: builds
Change-Id: If02c8107206fb60e4622f8937bee0d0a362e1c7d
parent 58f7f612
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -84,7 +84,6 @@ int android_get_control_socket(const char* name);
 *
 * These functions return INVALID_SOCKET (-1) on failure for all platforms.
 */
int socket_loopback_client(int port, int type);
cutils_socket_t socket_network_client(const char* host, int port, int type);
int socket_network_client_timeout(const char* host, int port, int type,
                                  int timeout, int* getaddrinfo_error);
+0 −1
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@ libcutils_nonwindows_sources = [
    "socket_inaddr_any_server_unix.c",
    "socket_local_client_unix.c",
    "socket_local_server_unix.c",
    "socket_loopback_client_unix.c",
    "socket_loopback_server_unix.c",
    "socket_network_client_unix.c",
    "sockets_unix.cpp",
+0 −40
Original line number Diff line number Diff line
/*
** Copyright 2006, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License"); 
** you may not use this file except in compliance with the License. 
** You may obtain a copy of the License at 
**
**     http://www.apache.org/licenses/LICENSE-2.0 
**
** Unless required by applicable law or agreed to in writing, software 
** distributed under the License is distributed on an "AS IS" BASIS, 
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
** See the License for the specific language governing permissions and 
** limitations under the License.
*/

#include <errno.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

#if !defined(_WIN32)
#include <sys/socket.h>
#include <sys/select.h>
#include <sys/types.h>
#include <netinet/in.h>
#endif

#include <cutils/sockets.h>

/* Connect to port on the loopback IP interface. type is
 * SOCK_STREAM or SOCK_DGRAM. 
 * return is a file descriptor or -1 on error
 */
int socket_loopback_client(int port, int type)
{
    return socket_network_client("localhost", port, type);
}