ESPHome 2025.5.0
Loading...
Searching...
No Matches
socket.cpp File Reference

Go to the source code of this file.

Namespaces

namespace  esphome
 Providing packet encoding functions for exchanging data with a remote host.
 
namespace  esphome::socket
 

Functions

std::unique_ptr< Socketesphome::socket::socket_ip (int type, int protocol)
 Create a socket in the newest available IP domain (IPv6 or IPv4) of the given type and protocol.
 
socklen_t esphome::socket::set_sockaddr (struct sockaddr *addr, socklen_t addrlen, const std::string &ip_address, uint16_t port)
 Set a sockaddr to the specified address and port for the IP version used by socket_ip().
 
socklen_t esphome::socket::set_sockaddr_any (struct sockaddr *addr, socklen_t addrlen, uint16_t port)
 Set a sockaddr to the any address and specified port for the IP version used by socket_ip().