-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
Summary
ESPHome 2026.3.0 devirtualizes the socket abstraction layer (PR #14398). socket::Socket and socket::ListenSocket are now concrete type aliases instead of virtual base classes. Code using std::unique_ptr<socket::Socket> with virtual dispatch will need to update.
Current usage
Uses std::unique_ptr<socket::Socket> for UDP sockets and calls socket::socket_ip_loop_monitored(), bind(), recvfrom() via virtual dispatch.
Recommended migration
socket::Socketis now a type alias for the platform-specific socket implementation —std::unique_ptr<socket::Socket>still workssocket::socket_ip()andsocket::socket_ip_loop_monitored()still returnstd::unique_ptr<socket::Socket>- Listen sockets must use
socket::ListenSocketinstead ofsocket::Socket - If you were subclassing
socket::Socketto create a custom socket implementation, that pattern is no longer supported
See the blog post for detailed migration examples.
References
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels