| Index: runtime/bin/socket_android.cc
|
| diff --git a/runtime/bin/socket_android.cc b/runtime/bin/socket_android.cc
|
| index d4b54002b3d4c183cc267ce27451dbf41ad12923..d8fe865435256ca369996d5e74ceb88000ca7a0a 100644
|
| --- a/runtime/bin/socket_android.cc
|
| +++ b/runtime/bin/socket_android.cc
|
| @@ -9,7 +9,7 @@
|
|
|
| #include "bin/socket.h"
|
|
|
| -#include <errno.h> // NOLINT
|
| +#include <errno.h> // NOLINT
|
|
|
| #include "bin/fdutils.h"
|
| #include "platform/signal_blocker.h"
|
| @@ -20,12 +20,10 @@ namespace bin {
|
| Socket::Socket(intptr_t fd)
|
| : ReferenceCounted(), fd_(fd), port_(ILLEGAL_PORT) {}
|
|
|
| -
|
| void Socket::SetClosedFd() {
|
| fd_ = kClosedFd;
|
| }
|
|
|
| -
|
| static intptr_t Create(const RawAddr& addr) {
|
| intptr_t fd;
|
| fd = NO_RETRY_EXPECTED(socket(addr.ss.ss_family, SOCK_STREAM, 0));
|
| @@ -39,7 +37,6 @@ static intptr_t Create(const RawAddr& addr) {
|
| return fd;
|
| }
|
|
|
| -
|
| static intptr_t Connect(intptr_t fd, const RawAddr& addr) {
|
| intptr_t result = TEMP_FAILURE_RETRY(
|
| connect(fd, &addr.addr, SocketAddress::GetAddrLength(addr)));
|
| @@ -50,7 +47,6 @@ static intptr_t Connect(intptr_t fd, const RawAddr& addr) {
|
| return -1;
|
| }
|
|
|
| -
|
| intptr_t Socket::CreateConnect(const RawAddr& addr) {
|
| intptr_t fd = Create(addr);
|
| if (fd < 0) {
|
| @@ -64,7 +60,6 @@ intptr_t Socket::CreateConnect(const RawAddr& addr) {
|
| return Connect(fd, addr);
|
| }
|
|
|
| -
|
| intptr_t Socket::CreateBindConnect(const RawAddr& addr,
|
| const RawAddr& source_addr) {
|
| intptr_t fd = Create(addr);
|
| @@ -82,7 +77,6 @@ intptr_t Socket::CreateBindConnect(const RawAddr& addr,
|
| return Connect(fd, addr);
|
| }
|
|
|
| -
|
| intptr_t Socket::CreateBindDatagram(const RawAddr& addr, bool reuseAddress) {
|
| intptr_t fd;
|
|
|
| @@ -115,7 +109,6 @@ intptr_t Socket::CreateBindDatagram(const RawAddr& addr, bool reuseAddress) {
|
| return fd;
|
| }
|
|
|
| -
|
| intptr_t ServerSocket::CreateBindListen(const RawAddr& addr,
|
| intptr_t backlog,
|
| bool v6_only) {
|
| @@ -169,13 +162,11 @@ intptr_t ServerSocket::CreateBindListen(const RawAddr& addr,
|
| return fd;
|
| }
|
|
|
| -
|
| bool ServerSocket::StartAccept(intptr_t fd) {
|
| USE(fd);
|
| return true;
|
| }
|
|
|
| -
|
| static bool IsTemporaryAcceptError(int error) {
|
| // On Android a number of protocol errors should be treated as EAGAIN.
|
| // These are the ones for TCP/IP.
|
| @@ -185,7 +176,6 @@ static bool IsTemporaryAcceptError(int error) {
|
| (error == ENETUNREACH);
|
| }
|
|
|
| -
|
| intptr_t ServerSocket::Accept(intptr_t fd) {
|
| intptr_t socket;
|
| struct sockaddr clientaddr;
|
|
|