#if (defined(WIN32) || defined(_WIN32)) && !defined(__MINGW32__)
/* ... */
-#if !defined(ssize_t)
-typedef SSIZE_T ssize_t;
+#define ssize_t SSIZE_T
#endif
+
+#if defined(WIN32) && defined(LWS_HAVE__STAT32I64)
+#include <sys/types.h>
+#include <sys/stat.h>
#endif
#if defined(LWS_HAVE_STDINT_H)
#endif
#endif
-typedef size_t lws_filepos_t;
-typedef ssize_t lws_fileofs_t;
+typedef unsigned long long lws_filepos_t;
+typedef long long lws_fileofs_t;
typedef uint32_t lws_fop_flags_t;
/** struct lws_pollargs - argument structure for all external poll related calls
*/
///@{
+struct lws_ssl_info {
+ int where;
+ int ret;
+};
/*
* NOTE: These public enums are part of the abi. If you want to add one,
/**< RAW mode file is writeable */
LWS_CALLBACK_RAW_CLOSE_FILE = 66,
/**< RAW mode wsi that adopted a file is closing */
+ LWS_CALLBACK_SSL_INFO = 67,
+ /**< SSL connections only. An event you registered an
+ * interest in at the vhost has occurred on a connection
+ * using the vhost. @in is a pointer to a
+ * struct lws_ssl_info containing information about the
+ * event*/
/****** add new things just above ---^ ******/
* members added above will see 0 (default) even if the app
* was not built against the newer headers.
*/
+ int ssl_info_event_mask;
+ /**< VHOST: mask of ssl events to be reported on LWS_CALLBACK_SSL_INFO
+ * callback for connections on this vhost. The mask values are of
+ * the form SSL_CB_ALERT, defined in openssl/ssl.h. The default of
+ * 0 means no info events will be reported.
+ */
void *_unused[8]; /**< dummy */
};
* served from a filesystem, or it is a cgi etc.
*/
enum lws_mount_protocols {
- LWSMPRO_HTTP = 0, /**< not supported yet */
- LWSMPRO_HTTPS = 1, /**< not supported yet */
+ LWSMPRO_HTTP = 0, /**< http reverse proxy */
+ LWSMPRO_HTTPS = 1, /**< https reverse proxy */
LWSMPRO_FILE = 2, /**< serve from filesystem directory */
LWSMPRO_CGI = 3, /**< pass to CGI to handle */
LWSMPRO_REDIR_HTTP = 4, /**< redirect to http:// url */
* even before the new wsi is returned and even if ultimately no wsi
* is returned.
*/
+ const char *iface;
+ /**< NULL to allow routing on any interface, or interface name or IP
+ * to bind the socket to */
/* Add new things just above here ---^
* This is part of the ABI, don't needlessly break compatibility
_WSI_TOKEN_CLIENT_HOST,
_WSI_TOKEN_CLIENT_ORIGIN,
_WSI_TOKEN_CLIENT_METHOD,
+ _WSI_TOKEN_CLIENT_IFACE,
/* always last real token index*/
WSI_TOKEN_COUNT,
PENDING_TIMEOUT_AWAITING_SOCKS_GREETING_REPLY = 19,
PENDING_TIMEOUT_AWAITING_SOCKS_CONNECT_REPLY = 20,
PENDING_TIMEOUT_AWAITING_SOCKS_AUTH_REPLY = 21,
+ PENDING_TIMEOUT_KILLED_BY_SSL_INFO = 22,
/****** add new things just above ---^ ******/
};
* useful when integrating with other app poll loop service code.
*/
LWS_VISIBLE LWS_EXTERN int
-lws_read(struct lws *wsi, unsigned char *buf, size_t len);
+lws_read(struct lws *wsi, unsigned char *buf, lws_filepos_t len);
/**
* lws_set_allocator() - custom allocator support