Merge "Remove socket_loopback_client."

am: 5171bebf41

Change-Id: I28080f043ba5a042573e81a6da3f5be83c7a4251
This commit is contained in:
Elliott Hughes 2016-10-14 20:37:06 +00:00 committed by android-build-merger
commit 091113ec6c
3 changed files with 0 additions and 42 deletions

View file

@ -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);

View file

@ -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",

View file

@ -1,40 +0,0 @@
/*
** 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);
}