added some urs code
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user