48 LWS_VISIBLE LWS_EXTERN
struct lws *
63 LWS_VISIBLE LWS_EXTERN
struct lws *
67 LWS_ADOPT_RAW_FILE_DESC = 0,
70 LWS_ADOPT_ALLOW_SSL = 4,
71 LWS_ADOPT_FLAG_UDP = 16,
72 LWS_ADOPT_FLAG_RAW_PROXY = 32,
74 LWS_ADOPT_RAW_SOCKET_UDP = LWS_ADOPT_SOCKET | LWS_ADOPT_FLAG_UDP,
78 lws_sockfd_type sockfd;
79 lws_filefd_type filefd;
82 #if defined(LWS_ESP_PLATFORM)
83 #include <lwip/sockets.h>
87 #if defined(LWS_WITH_IPV6)
88 struct sockaddr_in6 sa6;
90 #if defined(LWS_ESP_PLATFORM)
94 struct sockaddr_in sa4;
97 #define sa46_sockaddr(_sa46) ((struct sockaddr *)(_sa46))
99 #if defined(LWS_WITH_IPV6)
100 #define sa46_socklen(_sa46) (socklen_t)((_sa46)->sa4.sin_family == AF_INET ? \
101 sizeof(struct sockaddr_in) : \
102 sizeof(struct sockaddr_in6))
103 #define sa46_sockport(_sa46, _sp) { if ((_sa46)->sa4.sin_family == AF_INET) \
104 (_sa46)->sa4.sin_port = (_sp); else \
105 (_sa46)->sa6.sin6_port = (_sp); }
106 #define sa46_address(_sa46) ((uint8_t *)((_sa46)->sa4.sin_family == AF_INET ? \
107 &_sa46->sa4.sin_addr : &_sa46->sa6.sin6_addr ))
109 #define sa46_socklen(_sa46) (socklen_t)sizeof(struct sockaddr_in)
110 #define sa46_sockport(_sa46, _sp) (_sa46)->sa4.sin_port = (_sp)
111 #define sa46_address(_sa46) (uint8_t *)&_sa46->sa4.sin_addr
114 #define sa46_address_len(_sa46) ((_sa46)->sa4.sin_family == AF_INET ? 4 : 16)
116 #if defined(LWS_WITH_UDP)
143 LWS_VISIBLE LWS_EXTERN
struct lws *
149 struct lws_vhost *
vh;
180 LWS_VISIBLE LWS_EXTERN
struct lws *
206 LWS_VISIBLE LWS_EXTERN
struct lws *
208 const char *readbuf,
size_t len);
231 LWS_VISIBLE LWS_EXTERN
struct lws *
233 lws_sockfd_type accept_fd,
const char *readbuf,
236 #define LWS_CAUDP_BIND (1 << 0)
237 #define LWS_CAUDP_BROADCAST (1 << 1)
238 #define LWS_CAUDP_PF_PACKET (1 << 2)
240 #if defined(LWS_WITH_UDP)
262 LWS_VISIBLE LWS_EXTERN
struct lws *
263 lws_create_adopt_udp(
struct lws_vhost *vhost,
const char *ads,
int port,
264 int flags,
const char *protocol_name,
const char *ifname,
265 struct lws *parent_wsi,
void *opaque,
LWS_VISIBLE LWS_EXTERN struct lws * lws_adopt_socket_vhost(struct lws_vhost *vh, lws_sockfd_type accept_fd)
LWS_VISIBLE LWS_EXTERN struct lws * lws_adopt_socket_vhost_readbuf(struct lws_vhost *vhost, lws_sockfd_type accept_fd, const char *readbuf, size_t len)
LWS_VISIBLE LWS_EXTERN struct lws * lws_adopt_socket_readbuf(struct lws_context *context, lws_sockfd_type accept_fd, const char *readbuf, size_t len)
LWS_VISIBLE LWS_EXTERN struct lws * lws_adopt_socket(struct lws_context *context, lws_sockfd_type accept_fd)
LWS_VISIBLE LWS_EXTERN struct lws * lws_adopt_descriptor_vhost(struct lws_vhost *vh, lws_adoption_type type, lws_sock_file_fd_type fd, const char *vh_prot_name, struct lws *parent)
LWS_VISIBLE LWS_EXTERN struct lws * lws_adopt_descriptor_vhost_via_info(const lws_adopt_desc_t *info)
Definition: lws-adopt.h:148
const char * fi_wsi_name
Definition: lws-adopt.h:155
struct lws * parent
Definition: lws-adopt.h:153
const char * vh_prot_name
Definition: lws-adopt.h:152
void * opaque
Definition: lws-adopt.h:154
lws_sock_file_fd_type fd
Definition: lws-adopt.h:151
lws_adoption_type type
Definition: lws-adopt.h:150
struct lws_vhost * vh
Definition: lws-adopt.h:149
Definition: lws-retry.h:25
Definition: lws-adopt.h:77
Definition: lws-adopt.h:86