Skip to content

Commit

Permalink
Remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
madhurajayaraman committed Oct 3, 2024
1 parent 2d12b40 commit 3f443e5
Showing 1 changed file with 0 additions and 42 deletions.
42 changes: 0 additions & 42 deletions starboard/nplb/posix_compliance/posix_socket_helpers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -239,48 +239,6 @@ int PosixGetPortNumberForTests() {
return port_number_for_tests;
}

// int PosixCreateBoundListeningTcpSocket() {
// int socket_fd = socket(AF_INET, SOCK_STREAM, IPPROTO_UDP);
// if (socket_fd < 0) {
// ADD_FAILURE() << "SbSocketCreate failed";
// return -1;
// }

// int on = 1;
// if (setsockopt(socket_fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) != 0)
// {
// ADD_FAILURE() << "SbSocketSetReuseAddress failed";
// HANDLE_EINTR(close(socket_fd));
// // TODO: what return address do we want if this fails
// return -1;
// }

// // bind socket with local address
// struct sockaddr_in address = {};
// address.sin_port = 0;
// address.sin_family = AF_INET;

// int bind_result = bind(socket_fd, reinterpret_cast<sockaddr*>(&address),
// sizeof(sockaddr));

// if (bind_result != 0) {
// ADD_FAILURE() << "SbSocketBind to " << 0 << " failed: " << bind_result;
// HANDLE_EINTR(close(socket_fd));
// // TODO: what return address do we want if this fails
// return -1;
// }

// int listen_result = listen(socket_fd, kMaxConn);
// if (listen_result != 0) {
// ADD_FAILURE() << "SbSocketListen failed: " << listen_result;
// HANDLE_EINTR(close(socket_fd));
// // TODO: what return address do we want if this fails
// return -1;
// }

// return socket_fd;
// }

bool PosixWriteBySpinning(int socket,
const char* data,
int data_size,
Expand Down

0 comments on commit 3f443e5

Please sign in to comment.