Revert unnecessary socket_ip_loop_monitored rename

Keep the original function name since all callers already use it for
listening sockets. Only the return type changes to ListenSocket.
This commit is contained in:
J. Nick Koston
2026-02-28 23:00:32 -10:00
parent 7e119b1cbd
commit 164001b50c
5 changed files with 5 additions and 7 deletions
+1 -2
View File
@@ -54,8 +54,7 @@ void APIServer::setup() {
#endif
#endif
this->socket_ =
socket::socket_ip_listen_loop_monitored(SOCK_STREAM, 0).release(); // monitored for incoming connections
this->socket_ = socket::socket_ip_loop_monitored(SOCK_STREAM, 0).release(); // monitored for incoming connections
if (this->socket_ == nullptr) {
this->socket_failed_(LOG_STR("creation"));
return;
@@ -53,7 +53,7 @@ void DNSServer::start(const network::IPAddress &ip) {
#endif
// Create loop-monitored UDP socket
this->socket_ = socket::socket_ip_listen_loop_monitored(SOCK_DGRAM, IPPROTO_UDP).release();
this->socket_ = socket::socket_ip_loop_monitored(SOCK_DGRAM, IPPROTO_UDP).release();
if (this->socket_ == nullptr) {
ESP_LOGE(TAG, "Socket create failed");
return;
@@ -28,8 +28,7 @@ static constexpr uint32_t OTA_SOCKET_TIMEOUT_HANDSHAKE = 20000; // milliseconds
static constexpr uint32_t OTA_SOCKET_TIMEOUT_DATA = 90000; // milliseconds for data transfer
void ESPHomeOTAComponent::setup() {
this->server_ =
socket::socket_ip_listen_loop_monitored(SOCK_STREAM, 0).release(); // monitored for incoming connections
this->server_ = socket::socket_ip_loop_monitored(SOCK_STREAM, 0).release(); // monitored for incoming connections
if (this->server_ == nullptr) {
this->server_failed_(LOG_STR("creation"));
return;
+1 -1
View File
@@ -89,7 +89,7 @@ std::unique_ptr<Socket> socket_ip(int type, int protocol) {
#endif /* USE_NETWORK_IPV6 */
}
std::unique_ptr<ListenSocket> socket_ip_listen_loop_monitored(int type, int protocol) {
std::unique_ptr<ListenSocket> socket_ip_loop_monitored(int type, int protocol) {
#if USE_NETWORK_IPV6
return socket_listen_loop_monitored(AF_INET6, type, protocol);
#else
+1 -1
View File
@@ -60,7 +60,7 @@ std::unique_ptr<ListenSocket> socket_listen(int domain, int type, int protocol);
/// Create a listening socket and monitor it for data in the main loop.
std::unique_ptr<ListenSocket> socket_listen_loop_monitored(int domain, int type, int protocol);
/// Create a listening socket in the newest available IP domain and monitor it.
std::unique_ptr<ListenSocket> socket_ip_listen_loop_monitored(int type, int protocol);
std::unique_ptr<ListenSocket> socket_ip_loop_monitored(int type, int protocol);
/// Set a sockaddr to the specified address and port for the IP version used by socket_ip().
/// @param addr Destination sockaddr structure