added some urs code
This commit is contained in:
@ -54,6 +54,7 @@ subdir = include
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/argz.m4 \
|
||||
$(top_srcdir)/m4/ax_check_sign.m4 \
|
||||
$(top_srcdir)/m4/ax_cxx_namespace.m4 \
|
||||
$(top_srcdir)/m4/ax_numval.m4 $(top_srcdir)/m4/ax_pthread.m4 \
|
||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltdl.m4 \
|
||||
|
@ -56,6 +56,7 @@ DIST_COMMON = $(am__pkginclude_HEADERS_DIST) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/config.h.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/argz.m4 \
|
||||
$(top_srcdir)/m4/ax_check_sign.m4 \
|
||||
$(top_srcdir)/m4/ax_cxx_namespace.m4 \
|
||||
$(top_srcdir)/m4/ax_numval.m4 $(top_srcdir)/m4/ax_pthread.m4 \
|
||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltdl.m4 \
|
||||
|
@ -56,6 +56,7 @@ DIST_COMMON = $(am__pkginclude_HEADERS_DIST) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/argz.m4 \
|
||||
$(top_srcdir)/m4/ax_check_sign.m4 \
|
||||
$(top_srcdir)/m4/ax_cxx_namespace.m4 \
|
||||
$(top_srcdir)/m4/ax_numval.m4 $(top_srcdir)/m4/ax_pthread.m4 \
|
||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltdl.m4 \
|
||||
|
@ -34,6 +34,7 @@ pkginclude_HEADERS = \
|
||||
pma.h \
|
||||
rbt.h \
|
||||
rex.h \
|
||||
sck.h \
|
||||
sio.h \
|
||||
sll.h \
|
||||
slmb.h \
|
||||
|
@ -56,6 +56,7 @@ DIST_COMMON = $(am__pkginclude_HEADERS_DIST) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/argz.m4 \
|
||||
$(top_srcdir)/m4/ax_check_sign.m4 \
|
||||
$(top_srcdir)/m4/ax_cxx_namespace.m4 \
|
||||
$(top_srcdir)/m4/ax_numval.m4 $(top_srcdir)/m4/ax_pthread.m4 \
|
||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltdl.m4 \
|
||||
@ -84,8 +85,8 @@ am__can_run_installinfo = \
|
||||
am__pkginclude_HEADERS_DIST = alg.h chr.h cp949.h cp950.h dir.h dll.h \
|
||||
env.h fio.h fma.h fmt.h fs.h gdl.h glob.h htb.h hton.h ipad.h \
|
||||
lda.h main.h map.h mb8.h mbwc.h mem.h mux.h nwad.h nwif.h \
|
||||
nwio.h oht.h opt.h path.h pio.h pma.h rbt.h rex.h sio.h sll.h \
|
||||
slmb.h str.h task.h time.h tio.h tmr.h tre.h uni.h uri.h \
|
||||
nwio.h oht.h opt.h path.h pio.h pma.h rbt.h rex.h sck.h sio.h \
|
||||
sll.h slmb.h str.h task.h time.h tio.h tmr.h tre.h uni.h uri.h \
|
||||
utf8.h xma.h Mmgr.hpp StdMmgr.hpp Mmged.hpp
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
@ -298,9 +299,9 @@ top_srcdir = @top_srcdir@
|
||||
pkginclude_HEADERS = alg.h chr.h cp949.h cp950.h dir.h dll.h env.h \
|
||||
fio.h fma.h fmt.h fs.h gdl.h glob.h htb.h hton.h ipad.h lda.h \
|
||||
main.h map.h mb8.h mbwc.h mem.h mux.h nwad.h nwif.h nwio.h \
|
||||
oht.h opt.h path.h pio.h pma.h rbt.h rex.h sio.h sll.h slmb.h \
|
||||
str.h task.h time.h tio.h tmr.h tre.h uni.h uri.h utf8.h xma.h \
|
||||
$(am__append_1)
|
||||
oht.h opt.h path.h pio.h pma.h rbt.h rex.h sck.h sio.h sll.h \
|
||||
slmb.h str.h task.h time.h tio.h tmr.h tre.h uni.h uri.h \
|
||||
utf8.h xma.h $(am__append_1)
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include <qse/cmn/tio.h>
|
||||
#include <qse/cmn/nwad.h>
|
||||
#include <qse/cmn/time.h>
|
||||
#include <qse/cmn/sck.h>
|
||||
|
||||
enum qse_nwio_flag_t
|
||||
{
|
||||
@ -82,16 +83,7 @@ struct qse_nwio_tmout_t
|
||||
|
||||
typedef struct qse_nwio_tmout_t qse_nwio_tmout_t;
|
||||
|
||||
#if defined(_WIN32)
|
||||
typedef qse_uintptr_t qse_nwio_hnd_t;
|
||||
#elif defined(__OS2__)
|
||||
typedef int qse_nwio_hnd_t;
|
||||
#elif defined(__DOS__)
|
||||
typedef int qse_nwio_hnd_t;
|
||||
#else
|
||||
typedef int qse_nwio_hnd_t;
|
||||
#endif
|
||||
|
||||
typedef qse_sck_hnd_t qse_nwio_hnd_t;
|
||||
typedef struct qse_nwio_t qse_nwio_t;
|
||||
|
||||
/**
|
||||
@ -102,7 +94,7 @@ struct qse_nwio_t
|
||||
qse_mmgr_t* mmgr;
|
||||
int flags;
|
||||
qse_nwio_errnum_t errnum;
|
||||
qse_nwio_tmout_t tmout;
|
||||
qse_nwio_tmout_t tmout;
|
||||
qse_nwio_hnd_t handle;
|
||||
qse_tio_t* tio;
|
||||
int status;
|
||||
|
76
qse/include/qse/cmn/sck.h
Normal file
76
qse/include/qse/cmn/sck.h
Normal file
@ -0,0 +1,76 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright 2006-2014 Chung, Hyung-Hwan.
|
||||
This file is part of QSE.
|
||||
|
||||
QSE is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as
|
||||
published by the Free Software Foundation, either version 3 of
|
||||
the License, or (at your option) any later version.
|
||||
|
||||
QSE is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with QSE. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _QSE_CMN_SCK_H_
|
||||
#define _QSE_CMN_SCK_H_
|
||||
|
||||
|
||||
#include <qse/types.h>
|
||||
#include <qse/macros.h>
|
||||
|
||||
#if defined(_WIN32)
|
||||
typedef qse_uintptr_t qse_sck_hnd_t;
|
||||
# define QSE_INVALID_SCKHND (~(qse_sck_hnd_t)0)
|
||||
#elif defined(__OS2__)
|
||||
typedef int qse_sck_hnd_t;
|
||||
# define QSE_INVALID_SCKHND -1
|
||||
#elif defined(__DOS__)
|
||||
typedef int qse_sck_hnd_t;
|
||||
# define QSE_INVALID_SCKHND -1
|
||||
#else
|
||||
typedef int qse_sck_hnd_t;
|
||||
# define QSE_INVALID_SCKHND -1
|
||||
#endif
|
||||
|
||||
#if (QSE_SIZEOF_SOCKLEN_T == QSE_SIZEOF_INT)
|
||||
#if defined(QSE_SOCKLEN_T_IS_SIGNED)
|
||||
typedef int qse_sck_len_t;
|
||||
#else
|
||||
typedef unsigned int qse_sck_len_t;
|
||||
#endif
|
||||
#elif (QSE_SIZEOF_SOCKLEN_T == QSE_SIZEOF_LONG)
|
||||
#if defined(QSE_SOCKLEN_T_IS_SIGNED)
|
||||
typedef long qse_sck_len_t;
|
||||
#else
|
||||
typedef unsigned long qse_sck_len_t;
|
||||
#endif
|
||||
#else
|
||||
typedef int qse_sck_len_t;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
QSE_EXPORT int qse_isvalidsckhnd (
|
||||
qse_sck_hnd_t handle
|
||||
);
|
||||
|
||||
QSE_EXPORT void qse_closesckhnd (
|
||||
qse_sck_hnd_t handle
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -61,6 +61,7 @@
|
||||
/* these two have only to be large enough */
|
||||
# define QSE_SIZEOF_STRUCT_SOCKADDR_IN 32
|
||||
# define QSE_SIZEOF_STRUCT_SOCKADDR_IN6 64
|
||||
# define QSE_SIZEOF_SOCKLEN_T 4
|
||||
|
||||
# if !defined(QSE_CHAR_IS_WCHAR) && !defined(QSE_CHAR_IS_MCHAR)
|
||||
# define QSE_CHAR_IS_WCHAR 1
|
||||
@ -100,6 +101,7 @@
|
||||
/* these two have only to be large enough */
|
||||
# define QSE_SIZEOF_STRUCT_SOCKADDR_IN 32
|
||||
# define QSE_SIZEOF_STRUCT_SOCKADDR_IN6 64
|
||||
# define QSE_SIZEOF_SOCKLEN_T 4
|
||||
|
||||
# if !defined(QSE_CHAR_IS_WCHAR) && !defined(QSE_CHAR_IS_MCHAR)
|
||||
# define QSE_CHAR_IS_WCHAR 1
|
||||
|
@ -57,6 +57,7 @@
|
||||
/* these two have only to be large enough */
|
||||
# define QSE_SIZEOF_STRUCT_SOCKADDR_IN 32
|
||||
# define QSE_SIZEOF_STRUCT_SOCKADDR_IN6 64
|
||||
# define QSE_SIZEOF_SOCKLEN_T 4
|
||||
|
||||
# if !defined(QSE_CHAR_IS_WCHAR) && !defined(QSE_CHAR_IS_MCHAR)
|
||||
# define QSE_CHAR_IS_WCHAR 1
|
||||
|
@ -80,6 +80,7 @@ _M_X64 x64 platform
|
||||
/* these two have only to be large enough */
|
||||
# define QSE_SIZEOF_STRUCT_SOCKADDR_IN 32
|
||||
# define QSE_SIZEOF_STRUCT_SOCKADDR_IN6 64
|
||||
# define QSE_SIZEOF_SOCKLEN_T 4
|
||||
|
||||
# if !defined(QSE_CHAR_IS_WCHAR) && !defined(QSE_CHAR_IS_MCHAR)
|
||||
# define QSE_CHAR_IS_WCHAR 1
|
||||
@ -164,6 +165,7 @@ _M_X64 x64 platform
|
||||
/* these two have only to be large enough */
|
||||
# define QSE_SIZEOF_STRUCT_SOCKADDR_IN 32
|
||||
# define QSE_SIZEOF_STRUCT_SOCKADDR_IN6 64
|
||||
# define QSE_SIZEOF_SOCKLEN_T 4
|
||||
|
||||
# if !defined(QSE_CHAR_IS_WCHAR) && !defined(QSE_CHAR_IS_MCHAR)
|
||||
# define QSE_CHAR_IS_WCHAR 1
|
||||
@ -202,6 +204,7 @@ _M_X64 x64 platform
|
||||
/* these two have only to be large enough */
|
||||
# define QSE_SIZEOF_STRUCT_SOCKADDR_IN 32
|
||||
# define QSE_SIZEOF_STRUCT_SOCKADDR_IN6 64
|
||||
# define QSE_SIZEOF_SOCKLEN_T 4
|
||||
|
||||
# if !defined(QSE_CHAR_IS_WCHAR) && !defined(QSE_CHAR_IS_MCHAR)
|
||||
# define QSE_CHAR_IS_WCHAR 1
|
||||
|
@ -64,6 +64,7 @@
|
||||
/* these two have only to be large enough */
|
||||
# define QSE_SIZEOF_STRUCT_SOCKADDR_IN 32
|
||||
# define QSE_SIZEOF_STRUCT_SOCKADDR_IN6 64
|
||||
# define QSE_SIZEOF_SOCKLEN_T 4
|
||||
|
||||
# if !defined(QSE_CHAR_IS_WCHAR) && !defined(QSE_CHAR_IS_MCHAR)
|
||||
# define QSE_CHAR_IS_WCHAR 1
|
||||
@ -101,6 +102,7 @@
|
||||
|
||||
# define QSE_SIZEOF_STRUCT_SOCKADDR_IN 32
|
||||
# define QSE_SIZEOF_STRUCT_SOCKADDR_IN6 64
|
||||
# define QSE_SIZEOF_SOCKLEN_T 4
|
||||
|
||||
# if !defined(QSE_CHAR_IS_WCHAR) && !defined(QSE_CHAR_IS_MCHAR)
|
||||
# define QSE_CHAR_IS_WCHAR 1
|
||||
|
@ -118,6 +118,7 @@
|
||||
/* these two have only to be large enough */
|
||||
#define QSE_SIZEOF_STRUCT_SOCKADDR_IN 32
|
||||
#define QSE_SIZEOF_STRUCT_SOCKADDR_IN6 64
|
||||
#define QSE_SIZEOF_SOCKLEN_T 4
|
||||
|
||||
#if !defined(QSE_CHAR_IS_WCHAR) && !defined(QSE_CHAR_IS_MCHAR)
|
||||
# define QSE_CHAR_IS_WCHAR 1
|
||||
|
@ -350,6 +350,9 @@
|
||||
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
|
||||
#undef HAVE_NDIR_H
|
||||
|
||||
/* Define to 1 if you have the <netinet/sctp.h> header file. */
|
||||
#undef HAVE_NETINET_SCTP_H
|
||||
|
||||
/* Define to 1 if you have the <net/if_dl.h> header file. */
|
||||
#undef HAVE_NET_IF_DL_H
|
||||
|
||||
@ -461,9 +464,6 @@
|
||||
/* Define to 1 if you have the `sinq' function. */
|
||||
#undef HAVE_SINQ
|
||||
|
||||
/* Define it socklen_t typedef is in sys/socket.h. */
|
||||
#undef HAVE_SOCKLEN_T
|
||||
|
||||
/* Define to 1 if you have the <spawn.h> header file. */
|
||||
#undef HAVE_SPAWN_H
|
||||
|
||||
@ -853,6 +853,9 @@
|
||||
/* sizeof(short) */
|
||||
#undef QSE_SIZEOF_SHORT
|
||||
|
||||
/* sizeof(socklen_t) */
|
||||
#undef QSE_SIZEOF_SOCKLEN_T
|
||||
|
||||
/* sizeof(struct sockaddr_in) */
|
||||
#undef QSE_SIZEOF_STRUCT_SOCKADDR_IN
|
||||
|
||||
@ -886,6 +889,9 @@
|
||||
/* sizeof(__int8) */
|
||||
#undef QSE_SIZEOF___INT8
|
||||
|
||||
/* Define if socklen_t is signed */
|
||||
#undef QSE_SOCKLEN_T_IS_SIGNED
|
||||
|
||||
/* use qse_fltmax_t for floating-point numbers in AWK */
|
||||
#undef QSE_USE_AWK_FLTMAX
|
||||
|
||||
@ -928,6 +934,9 @@
|
||||
/* The size of `short', as computed by sizeof. */
|
||||
#undef SIZEOF_SHORT
|
||||
|
||||
/* The size of `socklen_t', as computed by sizeof. */
|
||||
#undef SIZEOF_SOCKLEN_T
|
||||
|
||||
/* The size of `struct sockaddr_in', as computed by sizeof. */
|
||||
#undef SIZEOF_STRUCT_SOCKADDR_IN
|
||||
|
||||
|
@ -55,6 +55,7 @@ DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/argz.m4 \
|
||||
$(top_srcdir)/m4/ax_check_sign.m4 \
|
||||
$(top_srcdir)/m4/ax_cxx_namespace.m4 \
|
||||
$(top_srcdir)/m4/ax_numval.m4 $(top_srcdir)/m4/ax_pthread.m4 \
|
||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltdl.m4 \
|
||||
|
@ -83,7 +83,7 @@ enum qse_httpd_trait_t
|
||||
QSE_HTTPD_PROXYNOVIA = (1 << 4),
|
||||
QSE_HTTPD_LOGACT = (1 << 5),
|
||||
QSE_HTTPD_DNSNOA = (1 << 6),
|
||||
QSE_HTTPD_DNSNOAAAA = (1 << 7),
|
||||
QSE_HTTPD_DNSNOAAAA = (1 << 7)
|
||||
};
|
||||
typedef enum qse_httpd_trait_t qse_httpd_trait_t;
|
||||
|
||||
@ -131,9 +131,9 @@ typedef struct qse_httpd_natr_t qse_httpd_natr_t;
|
||||
|
||||
struct qse_httpd_natr_t
|
||||
{
|
||||
qse_nwad_t nwad;
|
||||
qse_nwad_t nwad;
|
||||
qse_ntime_t tmout;
|
||||
int retries;
|
||||
int retries;
|
||||
};
|
||||
|
||||
typedef void (*qse_httpd_resol_t) (
|
||||
@ -584,13 +584,13 @@ struct qse_httpd_rsrc_cgi_t
|
||||
|
||||
enum qse_httpd_rsrc_proxy_flag_t
|
||||
{
|
||||
QSE_HTTPD_RSRC_PROXY_RAW = (1 << 0), /* raw proxying. set this for CONNECT */
|
||||
QSE_HTTPD_RSRC_PROXY_TRANSPARENT = (1 << 1),
|
||||
QSE_HTTPD_RSRC_PROXY_DST_STR = (1 << 2), /* destination is an unresovled string pointed to by dst.str */
|
||||
QSE_HTTPD_RSRC_PROXY_ENABLE_DNS = (1 << 3), /* dns service enabled */
|
||||
QSE_HTTPD_RSRC_PROXY_ENABLE_URS = (1 << 4), /* url rewriting enabled */
|
||||
QSE_HTTPD_RSRC_PROXY_DNS_SERVER = (1 << 5), /* dns address specified */
|
||||
QSE_HTTPD_RSRC_PROXY_URS_SERVER = (1 << 6) /* urs address specified */
|
||||
QSE_HTTPD_RSRC_PROXY_RAW = (1 << 0), /* raw proxying. set this for CONNECT */
|
||||
QSE_HTTPD_RSRC_PROXY_TRANSPARENT = (1 << 1),
|
||||
QSE_HTTPD_RSRC_PROXY_DST_STR = (1 << 2), /* destination is an unresovled string pointed to by dst.str */
|
||||
QSE_HTTPD_RSRC_PROXY_ENABLE_DNS = (1 << 3), /* dns service enabled (udp) */
|
||||
QSE_HTTPD_RSRC_PROXY_ENABLE_URS = (1 << 4), /* url rewriting enabled (udp) */
|
||||
QSE_HTTPD_RSRC_PROXY_DNS_SERVER = (1 << 5), /* dns address specified */
|
||||
QSE_HTTPD_RSRC_PROXY_URS_SERVER = (1 << 6), /* urs address specified */
|
||||
};
|
||||
|
||||
typedef struct qse_httpd_rsrc_proxy_t qse_httpd_rsrc_proxy_t;
|
||||
|
@ -56,6 +56,7 @@ DIST_COMMON = $(am__pkginclude_HEADERS_DIST) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/argz.m4 \
|
||||
$(top_srcdir)/m4/ax_check_sign.m4 \
|
||||
$(top_srcdir)/m4/ax_cxx_namespace.m4 \
|
||||
$(top_srcdir)/m4/ax_numval.m4 $(top_srcdir)/m4/ax_pthread.m4 \
|
||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltdl.m4 \
|
||||
|
@ -55,6 +55,7 @@ DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/argz.m4 \
|
||||
$(top_srcdir)/m4/ax_check_sign.m4 \
|
||||
$(top_srcdir)/m4/ax_cxx_namespace.m4 \
|
||||
$(top_srcdir)/m4/ax_numval.m4 $(top_srcdir)/m4/ax_pthread.m4 \
|
||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltdl.m4 \
|
||||
|
Reference in New Issue
Block a user