client: add libuv support to lws_client_reset
[platform/upstream/libwebsockets.git] / lib / private-libwebsockets.h
index ea6fcb5..1cee7c2 100644 (file)
@@ -134,6 +134,15 @@ char *ets_strchr(const char *s, int c);
 #include <mstcpip.h>
 #include <io.h>
 
+#if !defined(LWS_HAVE_ATOLL)
+#if defined(LWS_HAVE__ATOI64)
+#define atoll _atoi64
+#else
+#warning No atoll or _atoi64 available, using atoi
+#define atoll atoi
+#endif
+#endif
+
 #ifndef __func__
 #define __func__ __FUNCTION__
 #endif
@@ -881,6 +890,7 @@ struct lws_vhost {
        int ka_probes;
        int ka_interval;
        int keepalive_timeout;
+       int ssl_info_event_mask;
 #ifdef LWS_WITH_ACCESS_LOG
        int log_fd;
 #endif
@@ -1025,6 +1035,10 @@ LWS_EXTERN void
 lws_close_free_wsi_final(struct lws *wsi);
 LWS_EXTERN void
 lws_libuv_closehandle(struct lws *wsi);
+LWS_EXTERN void
+lws_libuv_closehandle_manually(struct lws *wsi);
+LWS_EXTERN int
+lws_libuv_check_watcher_active(struct lws *wsi);
 
 LWS_VISIBLE LWS_EXTERN int
 lws_plat_plugins_init(struct lws_context * context, const char * const *d);
@@ -1149,6 +1163,14 @@ LWS_EXTERN void lws_feature_status_libevent(struct lws_context_creation_info *in
 #else
 #define LWS_UNIX_SOCK_ENABLED(vhost) (0)
 #endif
+
+typedef union {
+#ifdef LWS_USE_IPV6
+       struct sockaddr_in6 sa6;
+#endif
+       struct sockaddr_in sa4;
+} sockaddr46;
+
 enum uri_path_states {
        URIPS_IDLE,
        URIPS_SEEN_SLASH,
@@ -1183,6 +1205,7 @@ struct client_info_stash {
        char origin[256];
        char protocol[256];
        char method[16];
+       char iface[16];
 };
 #endif
 
@@ -1611,6 +1634,7 @@ struct lws {
        unsigned int sending_chunked:1;
        unsigned int already_did_cce:1;
        unsigned int told_user_closed:1;
+       unsigned int ipv6:1;
 
 #if defined(LWS_WITH_ESP8266)
        unsigned int pending_send_completion:3;
@@ -2067,6 +2091,10 @@ lws_http_transaction_completed_client(struct lws *wsi);
 LWS_EXTERN int
 lws_context_init_client_ssl(struct lws_context_creation_info *info,
                            struct lws_vhost *vhost);
+
+LWS_EXTERN void
+lws_ssl_info_callback(const SSL *ssl, int where, int ret);
+
 #else
        #define lws_context_init_client_ssl(_a, _b) (0)
 #endif