#if defined(UNIX_ENABLED) && !defined(UNIX_SOCKET_UNAVAILABLE)
#include "net_socket_unix.h"
#include <errno.h>
#include <fcntl.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <poll.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
#ifdef WEB_ENABLED
#include <arpa/inet.h>
#endif
#if !defined(IPV6_ADD_MEMBERSHIP) && defined(IPV6_JOIN_GROUP)
#define IPV6_ADD_MEMBERSHIP …
#endif
#if !defined(IPV6_DROP_MEMBERSHIP) && defined(IPV6_LEAVE_GROUP)
#define IPV6_DROP_MEMBERSHIP …
#endif
size_t NetSocketUnix::_set_addr_storage(struct sockaddr_storage *p_addr, const IPAddress &p_ip, uint16_t p_port, IP::Type p_ip_type) { … }
void NetSocketUnix::_set_ip_port(struct sockaddr_storage *p_addr, IPAddress *r_ip, uint16_t *r_port) { … }
NetSocket *NetSocketUnix::_create_func() { … }
void NetSocketUnix::make_default() { … }
void NetSocketUnix::cleanup() { … }
NetSocketUnix::NetSocketUnix() { … }
NetSocketUnix::~NetSocketUnix() { … }
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wlogical-op"
#endif
NetSocketUnix::NetError NetSocketUnix::_get_socket_error() const { … }
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic pop
#endif
bool NetSocketUnix::_can_use_ip(const IPAddress &p_ip, const bool p_for_bind) const { … }
_FORCE_INLINE_ Error NetSocketUnix::_change_multicast_group(IPAddress p_ip, String p_if_name, bool p_add) { … }
void NetSocketUnix::_set_socket(int p_sock, IP::Type p_ip_type, bool p_is_stream) { … }
void NetSocketUnix::_set_close_exec_enabled(bool p_enabled) { … }
Error NetSocketUnix::open(Type p_sock_type, IP::Type &ip_type) { … }
void NetSocketUnix::close() { … }
Error NetSocketUnix::bind(IPAddress p_addr, uint16_t p_port) { … }
Error NetSocketUnix::listen(int p_max_pending) { … }
Error NetSocketUnix::connect_to_host(IPAddress p_host, uint16_t p_port) { … }
Error NetSocketUnix::poll(PollType p_type, int p_timeout) const { … }
Error NetSocketUnix::recv(uint8_t *p_buffer, int p_len, int &r_read) { … }
Error NetSocketUnix::recvfrom(uint8_t *p_buffer, int p_len, int &r_read, IPAddress &r_ip, uint16_t &r_port, bool p_peek) { … }
Error NetSocketUnix::send(const uint8_t *p_buffer, int p_len, int &r_sent) { … }
Error NetSocketUnix::sendto(const uint8_t *p_buffer, int p_len, int &r_sent, IPAddress p_ip, uint16_t p_port) { … }
Error NetSocketUnix::set_broadcasting_enabled(bool p_enabled) { … }
void NetSocketUnix::set_blocking_enabled(bool p_enabled) { … }
void NetSocketUnix::set_ipv6_only_enabled(bool p_enabled) { … }
void NetSocketUnix::set_tcp_no_delay_enabled(bool p_enabled) { … }
void NetSocketUnix::set_reuse_address_enabled(bool p_enabled) { … }
bool NetSocketUnix::is_open() const { … }
int NetSocketUnix::get_available_bytes() const { … }
Error NetSocketUnix::get_socket_address(IPAddress *r_ip, uint16_t *r_port) const { … }
Ref<NetSocket> NetSocketUnix::accept(IPAddress &r_ip, uint16_t &r_port) { … }
Error NetSocketUnix::join_multicast_group(const IPAddress &p_multi_address, const String &p_if_name) { … }
Error NetSocketUnix::leave_multicast_group(const IPAddress &p_multi_address, const String &p_if_name) { … }
#endif