From c73e06780d582ae964a922c4e5c414358542eb73 Mon Sep 17 00:00:00 2001 From: Madhura Jayaraman Date: Thu, 26 Sep 2024 10:27:59 -0700 Subject: [PATCH] Remove SbSocketSetFoo APIs Change-Id: I7592d5592d3cbbbe788263b31aaa92ec6f756d88 --- starboard/android/shared/BUILD.gn | 6 -- starboard/common/socket.cc | 24 ------- starboard/elf_loader/exported_symbols.cc | 6 -- starboard/linux/shared/BUILD.gn | 6 -- starboard/raspi/shared/BUILD.gn | 6 -- .../shared/posix/socket_set_broadcast.cc | 26 ------- .../posix/socket_set_receive_buffer_size.cc | 26 ------- .../posix/socket_set_send_buffer_size.cc | 26 ------- .../shared/posix/socket_set_tcp_keep_alive.cc | 40 ----------- .../shared/posix/socket_set_tcp_no_delay.cc | 27 -------- .../posix/socket_set_tcp_window_scaling.cc | 20 ------ starboard/shared/stub/socket_set_broadcast.cc | 19 ----- .../stub/socket_set_receive_buffer_size.cc | 19 ----- .../stub/socket_set_send_buffer_size.cc | 19 ----- .../shared/stub/socket_set_tcp_keep_alive.cc | 19 ----- .../shared/stub/socket_set_tcp_no_delay.cc | 19 ----- .../stub/socket_set_tcp_window_scaling.cc | 19 ----- starboard/socket.h | 69 ------------------- starboard/stub/BUILD.gn | 6 -- 19 files changed, 402 deletions(-) delete mode 100644 starboard/shared/posix/socket_set_broadcast.cc delete mode 100644 starboard/shared/posix/socket_set_receive_buffer_size.cc delete mode 100644 starboard/shared/posix/socket_set_send_buffer_size.cc delete mode 100644 starboard/shared/posix/socket_set_tcp_keep_alive.cc delete mode 100644 starboard/shared/posix/socket_set_tcp_no_delay.cc delete mode 100644 starboard/shared/posix/socket_set_tcp_window_scaling.cc delete mode 100644 starboard/shared/stub/socket_set_broadcast.cc delete mode 100644 starboard/shared/stub/socket_set_receive_buffer_size.cc delete mode 100644 starboard/shared/stub/socket_set_send_buffer_size.cc delete mode 100644 starboard/shared/stub/socket_set_tcp_keep_alive.cc delete mode 100644 starboard/shared/stub/socket_set_tcp_no_delay.cc delete mode 100644 starboard/shared/stub/socket_set_tcp_window_scaling.cc diff --git a/starboard/android/shared/BUILD.gn b/starboard/android/shared/BUILD.gn index 9b105ed0879e..205740fdf96e 100644 --- a/starboard/android/shared/BUILD.gn +++ b/starboard/android/shared/BUILD.gn @@ -99,13 +99,7 @@ static_library("starboard_platform") { "//starboard/shared/posix/socket_listen.cc", "//starboard/shared/posix/socket_receive_from.cc", "//starboard/shared/posix/socket_send_to.cc", - "//starboard/shared/posix/socket_set_broadcast.cc", - "//starboard/shared/posix/socket_set_receive_buffer_size.cc", "//starboard/shared/posix/socket_set_reuse_address.cc", - "//starboard/shared/posix/socket_set_send_buffer_size.cc", - "//starboard/shared/posix/socket_set_tcp_keep_alive.cc", - "//starboard/shared/posix/socket_set_tcp_no_delay.cc", - "//starboard/shared/posix/socket_set_tcp_window_scaling.cc", "//starboard/shared/posix/storage_write_record.cc", "//starboard/shared/posix/system_break_into_debugger.cc", "//starboard/shared/posix/system_clear_last_error.cc", diff --git a/starboard/common/socket.cc b/starboard/common/socket.cc index 0c859836e854..079e52de75a2 100644 --- a/starboard/common/socket.cc +++ b/starboard/common/socket.cc @@ -120,34 +120,10 @@ bool Socket::GetLocalAddress(SbSocketAddress* out_address) { return SbSocketGetLocalAddress(socket_, out_address); } -bool Socket::SetBroadcast(bool value) { - return SbSocketSetBroadcast(socket_, value); -} - bool Socket::SetReuseAddress(bool value) { return SbSocketSetReuseAddress(socket_, value); } -bool Socket::SetReceiveBufferSize(int32_t size) { - return SbSocketSetReceiveBufferSize(socket_, size); -} - -bool Socket::SetSendBufferSize(int32_t size) { - return SbSocketSetSendBufferSize(socket_, size); -} - -bool Socket::SetTcpKeepAlive(bool value, int64_t period) { - return SbSocketSetTcpKeepAlive(socket_, value, period); -} - -bool Socket::SetTcpNoDelay(bool value) { - return SbSocketSetTcpNoDelay(socket_, value); -} - -bool Socket::SetTcpWindowScaling(bool value) { - return SbSocketSetTcpWindowScaling(socket_, value); -} - SbSocket Socket::socket() { return socket_; } diff --git a/starboard/elf_loader/exported_symbols.cc b/starboard/elf_loader/exported_symbols.cc index 4bb61755dd74..6784eb05daf6 100644 --- a/starboard/elf_loader/exported_symbols.cc +++ b/starboard/elf_loader/exported_symbols.cc @@ -160,13 +160,7 @@ ExportedSymbols::ExportedSymbols() { REGISTER_SYMBOL(SbSocketListen); REGISTER_SYMBOL(SbSocketReceiveFrom); REGISTER_SYMBOL(SbSocketSendTo); - REGISTER_SYMBOL(SbSocketSetBroadcast); - REGISTER_SYMBOL(SbSocketSetReceiveBufferSize); REGISTER_SYMBOL(SbSocketSetReuseAddress); - REGISTER_SYMBOL(SbSocketSetSendBufferSize); - REGISTER_SYMBOL(SbSocketSetTcpKeepAlive); - REGISTER_SYMBOL(SbSocketSetTcpNoDelay); - REGISTER_SYMBOL(SbSocketSetTcpWindowScaling); REGISTER_SYMBOL(SbSocketWaiterAdd); REGISTER_SYMBOL(SbSocketWaiterCreate); REGISTER_SYMBOL(SbSocketWaiterDestroy); diff --git a/starboard/linux/shared/BUILD.gn b/starboard/linux/shared/BUILD.gn index 1ddd8aacbb6d..e4d7b856f9fb 100644 --- a/starboard/linux/shared/BUILD.gn +++ b/starboard/linux/shared/BUILD.gn @@ -169,13 +169,7 @@ static_library("starboard_platform_sources") { "//starboard/shared/posix/socket_listen.cc", "//starboard/shared/posix/socket_receive_from.cc", "//starboard/shared/posix/socket_send_to.cc", - "//starboard/shared/posix/socket_set_broadcast.cc", - "//starboard/shared/posix/socket_set_receive_buffer_size.cc", "//starboard/shared/posix/socket_set_reuse_address.cc", - "//starboard/shared/posix/socket_set_send_buffer_size.cc", - "//starboard/shared/posix/socket_set_tcp_keep_alive.cc", - "//starboard/shared/posix/socket_set_tcp_no_delay.cc", - "//starboard/shared/posix/socket_set_tcp_window_scaling.cc", "//starboard/shared/posix/storage_write_record.cc", "//starboard/shared/posix/system_break_into_debugger.cc", "//starboard/shared/posix/system_clear_last_error.cc", diff --git a/starboard/raspi/shared/BUILD.gn b/starboard/raspi/shared/BUILD.gn index b34d81b4a77a..3c95568341f5 100644 --- a/starboard/raspi/shared/BUILD.gn +++ b/starboard/raspi/shared/BUILD.gn @@ -127,13 +127,7 @@ static_library("starboard_platform_sources") { "//starboard/shared/posix/socket_listen.cc", "//starboard/shared/posix/socket_receive_from.cc", "//starboard/shared/posix/socket_send_to.cc", - "//starboard/shared/posix/socket_set_broadcast.cc", - "//starboard/shared/posix/socket_set_receive_buffer_size.cc", "//starboard/shared/posix/socket_set_reuse_address.cc", - "//starboard/shared/posix/socket_set_send_buffer_size.cc", - "//starboard/shared/posix/socket_set_tcp_keep_alive.cc", - "//starboard/shared/posix/socket_set_tcp_no_delay.cc", - "//starboard/shared/posix/socket_set_tcp_window_scaling.cc", "//starboard/shared/posix/storage_write_record.cc", "//starboard/shared/posix/system_break_into_debugger.cc", "//starboard/shared/posix/system_clear_last_error.cc", diff --git a/starboard/shared/posix/socket_set_broadcast.cc b/starboard/shared/posix/socket_set_broadcast.cc deleted file mode 100644 index 3efc0e8df957..000000000000 --- a/starboard/shared/posix/socket_set_broadcast.cc +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2015 The Cobalt Authors. All Rights Reserved. -// -// 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 "starboard/common/socket.h" - -#include - -#include "starboard/shared/posix/socket_internal.h" - -namespace sbposix = starboard::shared::posix; - -bool SbSocketSetBroadcast(SbSocket socket, bool value) { - return sbposix::SetBooleanSocketOption(socket, SOL_SOCKET, SO_BROADCAST, - "SO_BROADCAST", value); -} diff --git a/starboard/shared/posix/socket_set_receive_buffer_size.cc b/starboard/shared/posix/socket_set_receive_buffer_size.cc deleted file mode 100644 index fdd4b649d997..000000000000 --- a/starboard/shared/posix/socket_set_receive_buffer_size.cc +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2015 The Cobalt Authors. All Rights Reserved. -// -// 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 "starboard/common/socket.h" - -#include - -#include "starboard/shared/posix/socket_internal.h" - -namespace sbposix = starboard::shared::posix; - -bool SbSocketSetReceiveBufferSize(SbSocket socket, int32_t size) { - return sbposix::SetIntegerSocketOption(socket, SOL_SOCKET, SO_RCVBUF, - "SO_RCVBUF", size); -} diff --git a/starboard/shared/posix/socket_set_send_buffer_size.cc b/starboard/shared/posix/socket_set_send_buffer_size.cc deleted file mode 100644 index 05e517101103..000000000000 --- a/starboard/shared/posix/socket_set_send_buffer_size.cc +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2015 The Cobalt Authors. All Rights Reserved. -// -// 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 "starboard/common/socket.h" - -#include - -#include "starboard/shared/posix/socket_internal.h" - -namespace sbposix = starboard::shared::posix; - -bool SbSocketSetSendBufferSize(SbSocket socket, int32_t size) { - return sbposix::SetIntegerSocketOption(socket, SOL_SOCKET, SO_SNDBUF, - "SO_SNDBUF", size); -} diff --git a/starboard/shared/posix/socket_set_tcp_keep_alive.cc b/starboard/shared/posix/socket_set_tcp_keep_alive.cc deleted file mode 100644 index 871cc12517eb..000000000000 --- a/starboard/shared/posix/socket_set_tcp_keep_alive.cc +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2015 The Cobalt Authors. All Rights Reserved. -// -// 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 "starboard/common/socket.h" - -#include -#include - -#include "starboard/shared/posix/socket_internal.h" - -namespace sbposix = starboard::shared::posix; - -bool SbSocketSetTcpKeepAlive(SbSocket socket, bool value, int64_t period) { - bool result = sbposix::SetBooleanSocketOption( - socket, SOL_SOCKET, SO_KEEPALIVE, "SO_KEEPALIVE", value); - if (!result) { - return false; - } - - int period_seconds = static_cast(period / 1'000'000); - result = sbposix::SetIntegerSocketOption(socket, SOL_TCP, TCP_KEEPIDLE, - "TCP_KEEPIDLE", period_seconds); - if (!result) { - return false; - } - - return sbposix::SetIntegerSocketOption(socket, SOL_TCP, TCP_KEEPINTVL, - "TCP_KEEPINTVL", period_seconds); -} diff --git a/starboard/shared/posix/socket_set_tcp_no_delay.cc b/starboard/shared/posix/socket_set_tcp_no_delay.cc deleted file mode 100644 index c4faaf6e9731..000000000000 --- a/starboard/shared/posix/socket_set_tcp_no_delay.cc +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2015 The Cobalt Authors. All Rights Reserved. -// -// 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 "starboard/common/socket.h" - -#include -#include - -#include "starboard/shared/posix/socket_internal.h" - -namespace sbposix = starboard::shared::posix; - -bool SbSocketSetTcpNoDelay(SbSocket socket, bool value) { - return sbposix::SetBooleanSocketOption(socket, IPPROTO_TCP, TCP_NODELAY, - "TCP_NODELAY", value); -} diff --git a/starboard/shared/posix/socket_set_tcp_window_scaling.cc b/starboard/shared/posix/socket_set_tcp_window_scaling.cc deleted file mode 100644 index 7aaa5f0ed695..000000000000 --- a/starboard/shared/posix/socket_set_tcp_window_scaling.cc +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2015 The Cobalt Authors. All Rights Reserved. -// -// 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 "starboard/common/socket.h" - -bool SbSocketSetTcpWindowScaling(SbSocket socket, bool value) { - // This API is not supported in standard POSIX. - return false; -} diff --git a/starboard/shared/stub/socket_set_broadcast.cc b/starboard/shared/stub/socket_set_broadcast.cc deleted file mode 100644 index 9ce4e748024d..000000000000 --- a/starboard/shared/stub/socket_set_broadcast.cc +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2016 The Cobalt Authors. All Rights Reserved. -// -// 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 "starboard/common/socket.h" - -bool SbSocketSetBroadcast(SbSocket socket, bool value) { - return false; -} diff --git a/starboard/shared/stub/socket_set_receive_buffer_size.cc b/starboard/shared/stub/socket_set_receive_buffer_size.cc deleted file mode 100644 index 70cca39f60a9..000000000000 --- a/starboard/shared/stub/socket_set_receive_buffer_size.cc +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2016 The Cobalt Authors. All Rights Reserved. -// -// 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 "starboard/common/socket.h" - -bool SbSocketSetReceiveBufferSize(SbSocket socket, int32_t size) { - return false; -} diff --git a/starboard/shared/stub/socket_set_send_buffer_size.cc b/starboard/shared/stub/socket_set_send_buffer_size.cc deleted file mode 100644 index 9476284e338e..000000000000 --- a/starboard/shared/stub/socket_set_send_buffer_size.cc +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2016 The Cobalt Authors. All Rights Reserved. -// -// 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 "starboard/common/socket.h" - -bool SbSocketSetSendBufferSize(SbSocket socket, int32_t size) { - return false; -} diff --git a/starboard/shared/stub/socket_set_tcp_keep_alive.cc b/starboard/shared/stub/socket_set_tcp_keep_alive.cc deleted file mode 100644 index 40f35b716612..000000000000 --- a/starboard/shared/stub/socket_set_tcp_keep_alive.cc +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2016 The Cobalt Authors. All Rights Reserved. -// -// 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 "starboard/common/socket.h" - -bool SbSocketSetTcpKeepAlive(SbSocket socket, bool value, int64_t period) { - return false; -} diff --git a/starboard/shared/stub/socket_set_tcp_no_delay.cc b/starboard/shared/stub/socket_set_tcp_no_delay.cc deleted file mode 100644 index b02955849f28..000000000000 --- a/starboard/shared/stub/socket_set_tcp_no_delay.cc +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2016 The Cobalt Authors. All Rights Reserved. -// -// 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 "starboard/common/socket.h" - -bool SbSocketSetTcpNoDelay(SbSocket socket, bool value) { - return false; -} diff --git a/starboard/shared/stub/socket_set_tcp_window_scaling.cc b/starboard/shared/stub/socket_set_tcp_window_scaling.cc deleted file mode 100644 index 769c13625eb0..000000000000 --- a/starboard/shared/stub/socket_set_tcp_window_scaling.cc +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2016 The Cobalt Authors. All Rights Reserved. -// -// 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 "starboard/common/socket.h" - -bool SbSocketSetTcpWindowScaling(SbSocket socket, bool value) { - return false; -} diff --git a/starboard/socket.h b/starboard/socket.h index 6efbc41f979a..c65225e1e34c 100644 --- a/starboard/socket.h +++ b/starboard/socket.h @@ -328,18 +328,6 @@ SB_EXPORT int SbSocketSendTo(SbSocket socket, int data_size, const SbSocketAddress* destination); -// DEPRECATED with SB_API_VERSION 16 -// -// Sets the |SO_BROADCAST|, or equivalent, option to |value| on |socket|. The -// return value indicates whether the option was actually set. -// -// This option is only meaningful for UDP sockets and allows the socket to -// send to the broadcast address. -// -// |socket|: The SbSocket for which the option is set. -// |value|: The new value for the option. -SB_EXPORT bool SbSocketSetBroadcast(SbSocket socket, bool value); - // DEPRECATED with SB_API_VERSION 16 // // Sets the |SO_REUSEADDR|, or equivalent, option to |value| on |socket|. @@ -352,63 +340,6 @@ SB_EXPORT bool SbSocketSetBroadcast(SbSocket socket, bool value); // |value|: The new value for the option. SB_EXPORT bool SbSocketSetReuseAddress(SbSocket socket, bool value); -// DEPRECATED with SB_API_VERSION 16 -// -// Sets the |SO_RCVBUF|, or equivalent, option to |size| on |socket|. The -// return value indicates whether the option was actually set. -// -// |socket|: The SbSocket for which the option is set. -// |size|: The value for the option. -SB_EXPORT bool SbSocketSetReceiveBufferSize(SbSocket socket, int32_t size); - -// DEPRECATED with SB_API_VERSION 16 -// -// Sets the |SO_SNDBUF|, or equivalent, option to |size| on |socket|. The -// return value indicates whether the option was actually set. -// -// |socket|: The SbSocket for which the option is set. -// |size|: The value for the option. -SB_EXPORT bool SbSocketSetSendBufferSize(SbSocket socket, int32_t size); - -// DEPRECATED with SB_API_VERSION 16 -// -// Sets the |SO_KEEPALIVE|, or equivalent, option to |value| on |socket|. The -// return value indicates whether the option was actually set. -// -// |socket|: The SbSocket for which the option is set. -// |value|: If set to |true|, then |period| specifies the minimum time in -// microseconds between keep-alive packets. If set to |false|, |period| -// is ignored. -// |period|: The time in microseconds between keep-alive packets. This value -// is only relevant if |value| is |true|. -SB_EXPORT bool SbSocketSetTcpKeepAlive(SbSocket socket, - bool value, - int64_t period); - -// DEPRECATED with SB_API_VERSION 16 -// -// Sets the |TCP_NODELAY|, or equivalent, option to |value| on |socket|. The -// return value indicates whether the option was actually set. -// -// This function disables the Nagle algorithm for reducing the number of -// packets sent when converting from a stream to packets. Disabling Nagle -// generally puts the data for each Send call into its own packet, but does -// not guarantee that behavior. -// -// |socket|: The SbSocket for which the option is set. -// |value|: Indicates whether the Nagle algorithm should be disabled -// (|value|=|true|). -SB_EXPORT bool SbSocketSetTcpNoDelay(SbSocket socket, bool value); - -// DEPRECATED with SB_API_VERSION 16 -// -// Sets the |SO_WINSCALE|, or equivalent, option to |value| on |socket|. The -// return value indicates whether the option was actually set. -// -// |socket|: The SbSocket for which the option is set. -// |value|: The value for the option. -SB_EXPORT bool SbSocketSetTcpWindowScaling(SbSocket socket, bool value); - #ifdef __cplusplus } // extern "C" #endif diff --git a/starboard/stub/BUILD.gn b/starboard/stub/BUILD.gn index 40442cc6854f..11c149c10fcc 100644 --- a/starboard/stub/BUILD.gn +++ b/starboard/stub/BUILD.gn @@ -114,13 +114,7 @@ static_library("stub_sources") { "//starboard/shared/stub/socket_listen.cc", "//starboard/shared/stub/socket_receive_from.cc", "//starboard/shared/stub/socket_send_to.cc", - "//starboard/shared/stub/socket_set_broadcast.cc", - "//starboard/shared/stub/socket_set_receive_buffer_size.cc", "//starboard/shared/stub/socket_set_reuse_address.cc", - "//starboard/shared/stub/socket_set_send_buffer_size.cc", - "//starboard/shared/stub/socket_set_tcp_keep_alive.cc", - "//starboard/shared/stub/socket_set_tcp_no_delay.cc", - "//starboard/shared/stub/socket_set_tcp_window_scaling.cc", "//starboard/shared/stub/socket_waiter_add.cc", "//starboard/shared/stub/socket_waiter_create.cc", "//starboard/shared/stub/socket_waiter_destroy.cc",