Index: .hgignore
===================================================================
--- .hgignore	(revision 23)
+++ .hgignore	(revision 0)
@@ -3,5 +3,4 @@
 aclocal.m4
 autom4te.cache
-compile
 configure
 depcomp
@@ -12,3 +11,2 @@
 ltmain.sh
 m4/.*\.m4
-doc/html
Index: PYING
===================================================================
--- COPYING	(revision 12)
+++ 	(revision )
@@ -1,26 +1,0 @@
-Copyright (c) 2013, István Váradi
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-1. Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-3. Neither the name of the University nor the names of its contributors
-   may be used to endorse or promote products derived from this software
-   without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
Index: Makefile.am
===================================================================
--- Makefile.am	(revision 20)
+++ Makefile.am	(revision 0)
@@ -1,4 +1,2 @@
-SUBDIRS=src misc test doc
+SUBDIRS=src misc
 ACLOCAL_AMFLAGS=-I m4
-
-EXTRA_DIST=bootstrap.sh
Index: bootstrap.sh
===================================================================
--- bootstrap.sh	(revision 1)
+++ bootstrap.sh	(revision 0)
@@ -3,13 +3,13 @@
 scriptdir=`dirname $0`
 
+tempdir=`mktemp -d`
+trap "rm -rf ${tempdir}" EXIT
+
 cd "${scriptdir}"
 
-if test ! -e m4/vscpl.m4; then
-    mkdir -p m4
-    ln -s ../misc/vscpl.m4.in m4/vscpl.m4
-fi
+ln -s `pwd`/misc/vscpl.m4.in "${tempdir}/vscpl.m4"
 
 libtoolize
-aclocal -I m4
+aclocal -I "${tempdir}"
 automake -a
 autoconf
Index: configure.ac
===================================================================
--- configure.ac	(revision 43)
+++ configure.ac	(revision 0)
@@ -1,3 +1,3 @@
-AC_INIT(vscpl, 0.3, ivaradi@gmail.com)
+AC_INIT(vscpl, 0.1, ivaradi@gmail.com)
 AM_INIT_AUTOMAKE([foreign])
 
@@ -17,16 +17,10 @@
         src/hu/varadiistvan/Makefile
         src/hu/varadiistvan/scpl/Makefile
-        src/hu/varadiistvan/scpl/config.h
-        src/hu/varadiistvan/scpl/_posix/Makefile
-        src/hu/varadiistvan/scpl/_win32/Makefile
-        src/hu/varadiistvan/scpl/io/Makefile
-        src/hu/varadiistvan/scpl/io/_posix/Makefile
-        src/hu/varadiistvan/scpl/io/_win32/Makefile
         misc/Makefile
         misc/vscpl.m4
         misc/vscpl.pc
-        test/Makefile
-        doc/Makefile
 ])
 
+AC_CONFIG_HEADERS([src/hu/varadiistvan/scpl/config.h])
+
 AC_OUTPUT()
Index: c/Doxyfile
===================================================================
--- doc/Doxyfile	(revision 41)
+++ 	(revision )
@@ -1,1766 +1,0 @@
-# Doxyfile 1.8.1.2
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project.
-#
-# All text after a hash (#) is considered a comment and will be ignored.
-# The format is:
-#       TAG = value [value, ...]
-# For lists items can also be appended using:
-#       TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ").
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all
-# text before the first occurrence of this tag. Doxygen uses libiconv (or the
-# iconv built into libc) for the transcoding. See
-# http://www.gnu.org/software/libiconv for the list of possible encodings.
-
-DOXYFILE_ENCODING      = UTF-8
-
-# The PROJECT_NAME tag is a single word (or sequence of words) that should
-# identify the project. Note that if you do not use Doxywizard you need
-# to put quotes around the project name if it contains spaces.
-
-PROJECT_NAME           = "Very Simple Cross-Platform Library"
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number.
-# This could be handy for archiving the generated documentation or
-# if some version control system is used.
-
-PROJECT_NUMBER         =
-
-# Using the PROJECT_BRIEF tag one can provide an optional one line description
-# for a project that appears at the top of each page and should give viewer
-# a quick idea about the purpose of the project. Keep the description short.
-
-PROJECT_BRIEF          =
-
-# With the PROJECT_LOGO tag one can specify an logo or icon that is
-# included in the documentation. The maximum height of the logo should not
-# exceed 55 pixels and the maximum width should not exceed 200 pixels.
-# Doxygen will copy the logo to the output directory.
-
-PROJECT_LOGO           =
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-# If a relative path is entered, it will be relative to the location
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY       =
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-# 4096 sub-directories (in 2 levels) under the output directory of each output
-# format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of
-# source files, where putting all generated files in the same directory would
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS         = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# The default language is English, other supported languages are:
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
-# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
-# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
-# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
-# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,
-# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
-
-OUTPUT_LANGUAGE        = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-# include brief member descriptions after the members that are listed in
-# the file and class documentation (similar to JavaDoc).
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC      = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
-# the brief description of a member or function before the detailed description.
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF           = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator
-# that is used to form the text in various listings. Each string
-# in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is
-# used as the annotated text. Otherwise, the brief description is used as-is.
-# If left blank, the following values are used ("$name" is automatically
-# replaced with the name of the entity): "The $name class" "The $name widget"
-# "The $name file" "is" "provides" "specifies" "contains"
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF       =
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
-# description.
-
-ALWAYS_DETAILED_SEC    = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB  = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-# path before files name in the file list and in the header files. If set
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES        = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
-# can be used to strip a user-defined part of the path. Stripping is
-# only done if one of the specified strings matches the left-hand part of
-# the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the
-# path to strip.
-
-STRIP_FROM_PATH        =
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
-# the path mentioned in the documentation of a class, which tells
-# the reader which header file to include in order to use a class.
-# If left blank only the name of the header file containing the class
-# definition is used. Otherwise one should specify the include paths that
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH    =
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful if your file system
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES            = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
-# will interpret the first line (until the first dot) of a JavaDoc-style
-# comment as the brief description. If set to NO, the JavaDoc
-# comments will behave just like regular Qt-style comments
-# (thus requiring an explicit @brief command for a brief description.)
-
-JAVADOC_AUTOBRIEF      = NO
-
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
-# interpret the first line (until the first dot) of a Qt-style
-# comment as the brief description. If set to NO, the comments
-# will behave just like regular Qt-style comments (thus requiring
-# an explicit \brief command for a brief description.)
-
-QT_AUTOBRIEF           = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it
-# re-implements.
-
-INHERIT_DOCS           = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
-# a new page for each member. If set to NO, the documentation of a member will
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES  = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE               = 8
-
-# This tag can be used to specify a number of aliases that acts
-# as commands in the documentation. An alias has the form "name=value".
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to
-# put the command \sideeffect (or @sideeffect) in the documentation, which
-# will result in a user-defined paragraph with heading "Side Effects:".
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES                =
-
-# This tag can be used to specify a number of word-keyword mappings (TCL only).
-# A mapping has the form "name=value". For example adding
-# "class=itcl::class" will allow you to use the command class in the
-# itcl::class meaning.
-
-#TCL_SUBST              =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
-# sources only. Doxygen will then generate output that is more tailored for C.
-# For instance, some of the names that are used will be different. The list
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C  = NO
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
-# sources only. Doxygen will then generate output that is more tailored for
-# Java. For instance, namespaces will be presented as packages, qualified
-# scopes will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA   = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources only. Doxygen will then generate output that is more tailored for
-# Fortran.
-
-OPTIMIZE_FOR_FORTRAN   = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for
-# VHDL.
-
-OPTIMIZE_OUTPUT_VHDL   = NO
-
-# Doxygen selects the parser to use depending on the extension of the files it
-# parses. With this tag you can assign which parser to use for a given extension.
-# Doxygen has a built-in mapping, but you can override or extend it using this
-# tag. The format is ext=language, where ext is a file extension, and language
-# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
-# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
-# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
-# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
-# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
-
-EXTENSION_MAPPING      =
-
-# If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all
-# comments according to the Markdown format, which allows for more readable
-# documentation. See http://daringfireball.net/projects/markdown/ for details.
-# The output of markdown processing is further processed by doxygen, so you
-# can mix doxygen, HTML, and XML commands with Markdown formatting.
-# Disable only in case of backward compatibilities issues.
-
-MARKDOWN_SUPPORT       = YES
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should
-# set this tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
-# func(std::string) {}). This also makes the inheritance and collaboration
-# diagrams that involve STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT    = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-
-CPP_CLI_SUPPORT        = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
-# Doxygen will parse them like normal C++ but will assume all classes use public
-# instead of private inheritance when no explicit protection keyword is present.
-
-SIP_SUPPORT            = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate getter
-# and setter methods for a property. Setting this option to YES (the default)
-# will make doxygen replace the get and set methods by a property in the
-# documentation. This will only work if the methods are indeed getting or
-# setting a simple type. If this is not the case, or you want to show the
-# methods anyway, you should set this option to NO.
-
-IDL_PROPERTY_SUPPORT   = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC   = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-# the same type (for instance a group of public functions) to be put as a
-# subgroup of that type (e.g. under the Public Functions section). Set it to
-# NO to prevent subgrouping. Alternatively, this can be done per class using
-# the \nosubgrouping command.
-
-SUBGROUPING            = YES
-
-# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and
-# unions are shown inside the group in which they are included (e.g. using
-# @ingroup) instead of on a separate page (for HTML and Man pages) or
-# section (for LaTeX and RTF).
-
-INLINE_GROUPED_CLASSES = NO
-
-# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and
-# unions with only public data fields will be shown inline in the documentation
-# of the scope in which they are defined (i.e. file, namespace, or group
-# documentation), provided this scope is documented. If set to NO (the default),
-# structs, classes, and unions are shown on a separate page (for HTML and Man
-# pages) or section (for LaTeX and RTF).
-
-INLINE_SIMPLE_STRUCTS  = NO
-
-# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
-# is documented as struct, union, or enum with the name of the typedef. So
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
-# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically
-# be useful for C code in case the coding convention dictates that all compound
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-
-TYPEDEF_HIDES_STRUCT   = NO
-
-# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
-# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
-# their name and scope. Since this can be an expensive process and often the
-# same symbol appear multiple times in the code, doxygen keeps a cache of
-# pre-resolved symbols. If the cache is too small doxygen will become slower.
-# If the cache is too large, memory is wasted. The cache size is given by this
-# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols.
-
-LOOKUP_CACHE_SIZE      = 0
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available.
-# Private class members and static file members will be hidden unless
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL            = NO
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
-# will be included in the documentation.
-
-EXTRACT_PRIVATE        = YES
-
-# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal scope will be included in the documentation.
-
-EXTRACT_PACKAGE        = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file
-# will be included in the documentation.
-
-EXTRACT_STATIC         = NO
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
-# defined locally in source files will be included in the documentation.
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES  = YES
-
-# This flag is only useful for Objective-C code. When set to YES local
-# methods, which are defined in the implementation section but not in
-# the interface are included in the documentation.
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS  = NO
-
-# If this flag is set to YES, the members of anonymous namespaces will be
-# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base
-# name of the file that contains the anonymous namespace. By default
-# anonymous namespaces are hidden.
-
-EXTRACT_ANON_NSPACES   = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
-# undocumented members of documented classes, files or namespaces.
-# If set to NO (the default) these members will be included in the
-# various overviews, but no documentation section is generated.
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS     = NO
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy.
-# If set to NO (the default) these classes will be included in the various
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES     = NO
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
-# friend (class|struct|union) declarations.
-# If set to NO (the default) these declarations will be included in the
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS  = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
-# documentation blocks found inside the body of a function.
-# If set to NO (the default) these blocks will be appended to the
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS      = NO
-
-# The INTERNAL_DOCS tag determines if documentation
-# that is typed after a \internal command is included. If the tag is set
-# to NO (the default) then the documentation will be excluded.
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS          = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
-# file names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES       = YES
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
-# will show members with their full class and namespace scopes in the
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES       = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
-# will put a list of the files that are included by a file in the documentation
-# of that file.
-
-SHOW_INCLUDE_FILES     = YES
-
-# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
-# will list include files with double quotes in the documentation
-# rather than with sharp brackets.
-
-FORCE_LOCAL_INCLUDES   = NO
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
-# is inserted in the documentation for inline members.
-
-INLINE_INFO            = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
-# will sort the (detailed) documentation of file and class members
-# alphabetically by member name. If set to NO the members will appear in
-# declaration order.
-
-SORT_MEMBER_DOCS       = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
-# brief documentation of file, namespace and class members alphabetically
-# by member name. If set to NO (the default) the members will appear in
-# declaration order.
-
-SORT_BRIEF_DOCS        = NO
-
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
-# will sort the (brief and detailed) documentation of class members so that
-# constructors and destructors are listed first. If set to NO (the default)
-# the constructors will appear in the respective orders defined by
-# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
-# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
-# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
-
-SORT_MEMBERS_CTORS_1ST = NO
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
-# hierarchy of group names into alphabetical order. If set to NO (the default)
-# the group names will appear in their defined order.
-
-SORT_GROUP_NAMES       = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
-# sorted by fully-qualified names, including namespaces. If set to
-# NO (the default), the class list will be sorted only by class name,
-# not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME     = NO
-
-# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to
-# do proper type resolution of all parameters of a function it will reject a
-# match between the prototype and the implementation of a member function even
-# if there is only one candidate or it is obvious which candidate to choose
-# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen
-# will still accept a match between prototype and implementation in such cases.
-
-STRICT_PROTO_MATCHING  = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or
-# disable (NO) the todo list. This list is created by putting \todo
-# commands in the documentation.
-
-GENERATE_TODOLIST      = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or
-# disable (NO) the test list. This list is created by putting \test
-# commands in the documentation.
-
-GENERATE_TESTLIST      = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or
-# disable (NO) the bug list. This list is created by putting \bug
-# commands in the documentation.
-
-GENERATE_BUGLIST       = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
-# disable (NO) the deprecated list. This list is created by putting
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS       =
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or macro consists of for it to appear in
-# the documentation. If the initializer consists of more lines than specified
-# here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and macros in the
-# documentation can be controlled using \showinitializer or \hideinitializer
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES  = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
-# at the bottom of the documentation of classes and structs. If set to YES the
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES        = YES
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
-# This will remove the Files entry from the Quick Index and from the
-# Folder Tree View (if specified). The default is YES.
-
-SHOW_FILES             = YES
-
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
-# Namespaces page.
-# This will remove the Namespaces entry from the Quick Index
-# and from the Folder Tree View (if specified). The default is YES.
-
-SHOW_NAMESPACES        = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from
-# the version control system). Doxygen will invoke the program by executing (via
-# popen()) the command <command> <input-file>, where <command> is the value of
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
-# provided by doxygen. Whatever the program writes to standard output
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER    =
-
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
-# by doxygen. The layout file controls the global structure of the generated
-# output files in an output format independent way. To create the layout file
-# that represents doxygen's defaults, run doxygen with the -l option.
-# You can optionally specify a file name after the option, if omitted
-# DoxygenLayout.xml will be used as the name of the layout file.
-
-LAYOUT_FILE            =
-
-# The CITE_BIB_FILES tag can be used to specify one or more bib files
-# containing the references data. This must be a list of .bib files. The
-# .bib extension is automatically appended if omitted. Using this command
-# requires the bibtex tool to be installed. See also
-# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style
-# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this
-# feature you need bibtex and perl available in the search path.
-
-CITE_BIB_FILES         =
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET                  = YES
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated by doxygen. Possible values are YES and NO. If left blank
-# NO is used.
-
-WARNINGS               = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED   = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some
-# parameters in a documented function, or documenting parameters that
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR      = YES
-
-# The WARN_NO_PARAMDOC option can be enabled to get warnings for
-# functions that are documented, but have no documentation for their parameters
-# or return value. If set to NO (the default) doxygen will only warn about
-# wrong or incomplete parameter documentation, but not about the absence of
-# documentation.
-
-WARN_NO_PARAMDOC       = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that
-# doxygen can produce. The string should contain the $file, $line, and $text
-# tags, which will be replaced by the file and line number from which the
-# warning originated and the warning text. Optionally the format may contain
-# $version, which will be replaced by the version of the file (if it could
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT            = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning
-# and error messages should be written. If left blank the output is written
-# to stderr.
-
-WARN_LOGFILE           =
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain
-# documented source files. You may enter file names like "myfile.cpp" or
-# directories like "/usr/src/myproject". Separate the files or directories
-# with spaces.
-
-INPUT                  = overview.dox ../src/hu/varadiistvan/scpl \
-                         ../src/hu/varadiistvan/scpl/io
-
-# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
-# also the default input encoding. Doxygen uses libiconv (or the iconv built
-# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
-# the list of possible encodings.
-
-INPUT_ENCODING         = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank the following patterns are tested:
-# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh
-# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
-# *.f90 *.f *.for *.vhd *.vhdl
-
-FILE_PATTERNS          = *.h \
-                         *.cc
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
-# should be searched for input files as well. Possible values are YES and NO.
-# If left blank NO is used.
-
-RECURSIVE              = NO
-
-# The EXCLUDE tag can be used to specify files and/or directories that should be
-# excluded from the INPUT source files. This way you can easily exclude a
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-# Note that relative paths are relative to the directory from which doxygen is
-# run.
-
-EXCLUDE                =
-
-# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
-# directories that are symbolic links (a Unix file system feature) are excluded
-# from the input.
-
-EXCLUDE_SYMLINKS       = NO
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories. Note that the wildcards are matched
-# against the file with absolute path, so to exclude all test directories
-# for example use the pattern */test/*
-
-EXCLUDE_PATTERNS       =
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the
-# output. The symbol name can be a fully qualified name, a word, or if the
-# wildcard * is used, a substring. Examples: ANamespace, AClass,
-# AClass::ANamespace, ANamespace::*Test
-
-EXCLUDE_SYMBOLS        =
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or
-# directories that contain example code fragments that are included (see
-# the \include command).
-
-EXAMPLE_PATH           =
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank all files are included.
-
-EXAMPLE_PATTERNS       =
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude
-# commands irrespective of the value of the RECURSIVE tag.
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE      = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or
-# directories that contain image that are included in the documentation (see
-# the \image command).
-
-IMAGE_PATH             =
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command <filter> <input-file>, where <filter>
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
-# input file. Doxygen will then use the output that the filter program writes
-# to standard output.
-# If FILTER_PATTERNS is specified, this tag will be
-# ignored.
-
-INPUT_FILTER           =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis.
-# Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match.
-# The filters are a list of the form:
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty or if
-# non of the patterns match the file name, INPUT_FILTER is applied.
-
-FILTER_PATTERNS        =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will be used to filter the input files when producing source
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES    = NO
-
-# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
-# pattern. A pattern will override the setting for FILTER_PATTERN (if any)
-# and it is also possible to disable source filtering for a specific pattern
-# using *.ext= (so without naming a filter). This option only has effect when
-# FILTER_SOURCE_FILES is enabled.
-
-FILTER_SOURCE_PATTERNS =
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will
-# be generated. Documented entities will be cross-referenced with these sources.
-# Note: To get rid of all source code in the generated output, make sure also
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER         = YES
-
-# Setting the INLINE_SOURCES tag to YES will include the body
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES         = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-# doxygen to hide any special comment blocks from generated source code
-# fragments. Normal C, C++ and Fortran comments will always remain visible.
-
-STRIP_CODE_COMMENTS    = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES
-# then for each documented function all documented
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = NO
-
-# If the REFERENCES_RELATION tag is set to YES
-# then for each documented function all documented entities
-# called/used by that function will be listed.
-
-REFERENCES_RELATION    = NO
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code.
-# Otherwise they will link to the documentation.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code
-# will point to the HTML generated by the htags(1) tool instead of doxygen
-# built-in source browser. The htags tool is part of GNU's global source
-# tagging system (see http://www.gnu.org/software/global/global.html). You
-# will need version 4.8.6 or higher.
-
-USE_HTAGS              = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-# will generate a verbatim copy of the header file for each class for
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS       = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-# of all compounds will be generated. Enable this if the project
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX     = YES
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
-# in which this list will be split (can be a number in the range [1..20])
-
-#COLS_IN_ALPHA_INDEX    = 5
-
-# In case all classes in a project start with a common prefix, all
-# classes will be put under the same header in the alphabetical index.
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX          =
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
-# generate HTML output.
-
-GENERATE_HTML          = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT            = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION    = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard header. Note that when using a custom header you are responsible
-#  for the proper inclusion of any scripts and style sheets that doxygen
-# needs, which is dependent on the configuration options used.
-# It is advised to generate a default header using "doxygen -w html
-# header.html footer.html stylesheet.css YourConfigFile" and then modify
-# that header. Note that the header is subject to change so you typically
-# have to redo this when upgrading to a newer version of doxygen or when
-# changing the value of configuration settings such as GENERATE_TREEVIEW!
-
-HTML_HEADER            =
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard footer.
-
-HTML_FOOTER            =
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-# style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If the tag is left blank doxygen
-# will generate a default style sheet. Note that doxygen will try to copy
-# the style sheet file to the HTML output directory, so don't put your own
-# style sheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET        =
-
-# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
-# other source files which should be copied to the HTML output directory. Note
-# that these files will be copied to the base HTML output directory. Use the
-# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
-# files. In the HTML_STYLESHEET file, use the file name only. Also note that
-# the files will be copied as-is; there are no commands or markers available.
-
-HTML_EXTRA_FILES       =
-
-# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
-# Doxygen will adjust the colors in the style sheet and background images
-# according to this color. Hue is specified as an angle on a colorwheel,
-# see http://en.wikipedia.org/wiki/Hue for more information.
-# For instance the value 0 represents red, 60 is yellow, 120 is green,
-# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
-# The allowed range is 0 to 359.
-
-HTML_COLORSTYLE_HUE    = 220
-
-# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
-# the colors in the HTML output. For a value of 0 the output will use
-# grayscales only. A value of 255 will produce the most vivid colors.
-
-HTML_COLORSTYLE_SAT    = 100
-
-# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
-# the luminance component of the colors in the HTML output. Values below
-# 100 gradually make the output lighter, whereas values above 100 make
-# the output darker. The value divided by 100 is the actual gamma applied,
-# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
-# and 100 does not change the gamma.
-
-HTML_COLORSTYLE_GAMMA  = 80
-
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-# page will contain the date and time when the page was generated. Setting
-# this to NO can help when comparing the output of multiple runs.
-
-HTML_TIMESTAMP         = YES
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
-# documentation will contain sections that can be hidden and shown after the
-# page has loaded.
-
-HTML_DYNAMIC_SECTIONS  = NO
-
-# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of
-# entries shown in the various tree structured indices initially; the user
-# can expand and collapse entries dynamically later on. Doxygen will expand
-# the tree to such a level that at most the specified number of entries are
-# visible (unless a fully collapsed tree already exceeds this amount).
-# So setting the number of entries 1 will produce a full collapsed tree by
-# default. 0 is a special value representing an infinite number of entries
-# and will result in a full expanded tree by default.
-
-HTML_INDEX_NUM_ENTRIES = 100
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files
-# will be generated that can be used as input for Apple's Xcode 3
-# integrated development environment, introduced with OSX 10.5 (Leopard).
-# To create a documentation set, doxygen will generate a Makefile in the
-# HTML output directory. Running make will produce the docset in that
-# directory and running "make install" will install the docset in
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
-# it at startup.
-# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
-# for more information.
-
-GENERATE_DOCSET        = NO
-
-# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
-# feed. A documentation feed provides an umbrella under which multiple
-# documentation sets from a single provider (such as a company or product suite)
-# can be grouped.
-
-DOCSET_FEEDNAME        = "Doxygen generated docs"
-
-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
-# should uniquely identify the documentation set bundle. This should be a
-# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
-# will append .docset to the name.
-
-DOCSET_BUNDLE_ID       = org.doxygen.Project
-
-# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
-# the documentation publisher. This should be a reverse domain-name style
-# string, e.g. com.mycompany.MyDocSet.documentation.
-
-DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
-
-# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
-
-DOCSET_PUBLISHER_NAME  = Publisher
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP      = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-# be used to specify the file name of the resulting .chm file. You
-# can add a path in front of the file if the result should not be
-# written to the html output directory.
-
-CHM_FILE               =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-# be used to specify the location (absolute path including file name) of
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION           =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-# controls if a separate .chi index file is generated (YES) or that
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI           = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
-# is used to encode HtmlHelp index (hhk), content (hhc) and project file
-# content.
-
-CHM_INDEX_ENCODING     =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-# controls whether a binary table of contents is generated (YES) or a
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC             = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND             = NO
-
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
-# that can be used as input for Qt's qhelpgenerator to generate a
-# Qt Compressed Help (.qch) of the generated HTML documentation.
-
-GENERATE_QHP           = NO
-
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
-# be used to specify the file name of the resulting .qch file.
-# The path specified is relative to the HTML output folder.
-
-QCH_FILE               =
-
-# The QHP_NAMESPACE tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#namespace
-
-QHP_NAMESPACE          = org.doxygen.Project
-
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#virtual-folders
-
-QHP_VIRTUAL_FOLDER     = doc
-
-# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
-# add. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#custom-filters
-
-QHP_CUST_FILTER_NAME   =
-
-# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
-# custom filter to add. For more information please see
-# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
-# Qt Help Project / Custom Filters</a>.
-
-QHP_CUST_FILTER_ATTRS  =
-
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
-# project's
-# filter section matches.
-# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
-# Qt Help Project / Filter Attributes</a>.
-
-QHP_SECT_FILTER_ATTRS  =
-
-# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
-# be used to specify the location of Qt's qhelpgenerator.
-# If non-empty doxygen will try to run qhelpgenerator on the generated
-# .qhp file.
-
-QHG_LOCATION           =
-
-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
-#  will be generated, which together with the HTML files, form an Eclipse help
-# plugin. To install this plugin and make it available under the help contents
-# menu in Eclipse, the contents of the directory containing the HTML and XML
-# files needs to be copied into the plugins directory of eclipse. The name of
-# the directory within the plugins directory should be the same as
-# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
-# the help appears.
-
-GENERATE_ECLIPSEHELP   = NO
-
-# A unique identifier for the eclipse help plugin. When installing the plugin
-# the directory name containing the HTML and XML files should also have
-# this name.
-
-ECLIPSE_DOC_ID         = org.doxygen.Project
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs)
-# at top of each HTML page. The value NO (the default) enables the index and
-# the value YES disables it. Since the tabs have the same information as the
-# navigation tree you can set this option to NO if you already set
-# GENERATE_TREEVIEW to YES.
-
-DISABLE_INDEX          = NO
-
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information.
-# If the tag value is set to YES, a side panel will be generated
-# containing a tree-like index structure (just like the one that
-# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
-# Windows users are probably better off using the HTML help feature.
-# Since the tree basically has the same information as the tab index you
-# could consider to set DISABLE_INDEX to NO when enabling this option.
-
-GENERATE_TREEVIEW      = NO
-
-# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values
-# (range [0,1..20]) that doxygen will group on one line in the generated HTML
-# documentation. Note that a value of 0 will completely suppress the enum
-# values from appearing in the overview section.
-
-ENUM_VALUES_PER_LINE   = 4
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-# used to set the initial width (in pixels) of the frame in which the tree
-# is shown.
-
-TREEVIEW_WIDTH         = 250
-
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
-# links to external symbols imported via tag files in a separate window.
-
-EXT_LINKS_IN_WINDOW    = NO
-
-# Use this tag to change the font size of Latex formulas included
-# as images in the HTML documentation. The default is 10. Note that
-# when you change the font size after a successful doxygen run you need
-# to manually remove any form_*.png images from the HTML output directory
-# to force them to be regenerated.
-
-FORMULA_FONTSIZE       = 10
-
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images
-# generated for formulas are transparent PNGs. Transparent PNGs are
-# not supported properly for IE 6.0, but are supported on all modern browsers.
-# Note that when changing this option you need to delete any form_*.png files
-# in the HTML output before the changes have effect.
-
-FORMULA_TRANSPARENT    = YES
-
-# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax
-# (see http://www.mathjax.org) which uses client side Javascript for the
-# rendering instead of using prerendered bitmaps. Use this if you do not
-# have LaTeX installed or if you want to formulas look prettier in the HTML
-# output. When enabled you may also need to install MathJax separately and
-# configure the path to it using the MATHJAX_RELPATH option.
-
-USE_MATHJAX            = NO
-
-# When MathJax is enabled you need to specify the location relative to the
-# HTML output directory using the MATHJAX_RELPATH option. The destination
-# directory should contain the MathJax.js script. For instance, if the mathjax
-# directory is located at the same level as the HTML output directory, then
-# MATHJAX_RELPATH should be ../mathjax. The default value points to
-# the MathJax Content Delivery Network so you can quickly see the result without
-# installing MathJax.
-# However, it is strongly recommended to install a local
-# copy of MathJax from http://www.mathjax.org before deployment.
-
-MATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest
-
-# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
-# names that should be enabled during MathJax rendering.
-
-MATHJAX_EXTENSIONS     =
-
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box
-# for the HTML output. The underlying search engine uses javascript
-# and DHTML and should work on any modern browser. Note that when using
-# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
-# (GENERATE_DOCSET) there is already a search function so this one should
-# typically be disabled. For large projects the javascript based search engine
-# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
-
-SEARCHENGINE           = YES
-
-# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
-# implemented using a PHP enabled web server instead of at the web client
-# using Javascript. Doxygen will generate the search PHP script and index
-# file to put on the web server. The advantage of the server
-# based approach is that it scales better to large projects and allows
-# full text search. The disadvantages are that it is more difficult to setup
-# and does not have live searching capabilities.
-
-SERVER_BASED_SEARCH    = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
-# generate Latex output.
-
-GENERATE_LATEX         = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT           = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked. If left blank `latex' will be used as the default command name.
-# Note that when enabling USE_PDFLATEX this option is only used for
-# generating bitmaps for formulas in the HTML output, but not in the
-# Makefile that is written to the output directory.
-
-LATEX_CMD_NAME         = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
-# generate index for LaTeX. If left blank `makeindex' will be used as the
-# default command name.
-
-MAKEINDEX_CMD_NAME     = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
-# LaTeX documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_LATEX          = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, letter, legal and
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE             = a4
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES         =
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
-# the generated latex document. The header should contain everything until
-# the first chapter. If it is left blank doxygen will generate a
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER           =
-
-# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for
-# the generated latex document. The footer should contain everything after
-# the last chapter. If it is left blank doxygen will generate a
-# standard footer. Notice: only use this tag if you know what you are doing!
-
-LATEX_FOOTER           =
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will
-# contain links (just like the HTML output) instead of page references
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS         = YES
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
-# plain latex in the generated Makefile. Set this option to YES to get a
-# higher quality PDF documentation.
-
-USE_PDFLATEX           = YES
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
-# command to the generated LaTeX files. This will instruct LaTeX to keep
-# running if errors occur, instead of asking the user for help.
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE        = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not
-# include the index chapters (such as File Index, Compound Index, etc.)
-# in the output.
-
-LATEX_HIDE_INDICES     = NO
-
-# If LATEX_SOURCE_CODE is set to YES then doxygen will include
-# source code with syntax highlighting in the LaTeX output.
-# Note that which sources are shown also depends on other settings
-# such as SOURCE_BROWSER.
-
-LATEX_SOURCE_CODE      = NO
-
-# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
-# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See
-# http://en.wikipedia.org/wiki/BibTeX for more info.
-
-LATEX_BIB_STYLE        = plain
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
-# The RTF output is optimized for Word 97 and may not look very pretty with
-# other RTF readers or editors.
-
-GENERATE_RTF           = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT             = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
-# RTF documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_RTF            = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
-# will contain hyperlink fields. The RTF file will
-# contain links (just like the HTML output) instead of page references.
-# This makes the output suitable for online browsing using WORD or other
-# programs which support those fields.
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS         = NO
-
-# Load style sheet definitions from file. Syntax is similar to doxygen's
-# config file, i.e. a series of assignments. You only have to provide
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE    =
-
-# Set optional variables used in the generation of an rtf document.
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE    =
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
-# generate man pages
-
-GENERATE_MAN           = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT             = man
-
-# The MAN_EXTENSION tag determines the extension that is added to
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION          = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
-# then it will generate one additional man file for each entity
-# documented in the real man page(s). These additional files
-# only source the real man page, but without them the man command
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS              = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will
-# generate an XML file that captures the structure of
-# the code including all documentation.
-
-GENERATE_XML           = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT             = xml
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
-# dump the program listings (including syntax highlighting
-# and cross-referencing information) to the XML output. Note that
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING     = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
-# generate an AutoGen Definitions (see autogen.sf.net) file
-# that captures the structure of the code including all
-# documentation. Note that this feature is still experimental
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF   = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will
-# generate a Perl module file that captures the structure of
-# the code including all documentation. Note that this
-# feature is still experimental and incomplete at the
-# moment.
-
-GENERATE_PERLMOD       = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX          = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader.
-# This is useful
-# if you want to understand what is going on.
-# On the other hand, if this
-# tag is set to NO the size of the Perl module output will be much smaller
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY         = YES
-
-# The names of the make variables in the generated doxyrules.make file
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
-# This is useful so different doxyrules.make files included by the same
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
-# evaluate all C-preprocessor directives found in the sources and include
-# files.
-
-ENABLE_PREPROCESSING   = NO
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
-# names in the source code. If set to NO (the default) only conditional
-# compilation will be performed. Macro expansion can be done in a controlled
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION        = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
-# then the macro expansion is limited to the macros specified with the
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
-EXPAND_ONLY_PREDEF     = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
-# pointed to by INCLUDE_PATH will be searched when a #include is found.
-
-SEARCH_INCLUDES        = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by
-# the preprocessor.
-
-INCLUDE_PATH           =
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will
-# be used.
-
-INCLUDE_FILE_PATTERNS  =
-
-# The PREDEFINED tag can be used to specify one or more macro names that
-# are defined before the preprocessor is started (similar to the -D option of
-# gcc). The argument of the tag is a list of macros of the form: name
-# or name=definition (no spaces). If the definition and the = are
-# omitted =1 is assumed. To prevent a macro definition from being
-# undefined via #undef or recursively expanded use the := operator
-# instead of the = operator.
-
-PREDEFINED             =
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
-# this tag can be used to specify a list of macro names that should be expanded.
-# The macro definition that is found in the sources will be used.
-# Use the PREDEFINED tag if you want to use a different macro definition that
-# overrules the definition found in the source code.
-
-EXPAND_AS_DEFINED      =
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all references to function-like macros
-# that are alone on a line, have an all uppercase name, and do not end with a
-# semicolon, because these will confuse the parser if not removed.
-
-SKIP_FUNCTION_MACROS   = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles. For each
-# tag file the location of the external documentation should be added. The
-# format of a tag file without this location is as follows:
-#
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-#
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where "loc1" and "loc2" can be relative or absolute paths
-# or URLs. Note that each tag file must have a unique name (where the name does
-# NOT include the path). If a tag file is not located in the directory in which
-# doxygen is run, you must also specify the path to the tagfile here.
-
-TAGFILES               =
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE       =
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed
-# in the class index. If set to NO only the inherited external classes
-# will be listed.
-
-ALLEXTERNALS           = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will
-# be listed.
-
-EXTERNAL_GROUPS        = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of `which perl').
-
-#PERL_PATH              = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
-# or super classes. Setting the tag to NO turns the diagrams off. Note that
-# this option also works with HAVE_DOT disabled, but it is recommended to
-# install and use dot, since it yields more powerful graphs.
-
-CLASS_DIAGRAMS         = YES
-
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see
-# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-#MSCGEN_PATH            =
-
-# If set to YES, the inheritance and collaboration graphs will hide
-# inheritance and usage relations if the target is undocumented
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS   = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz, a graph visualization
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT               = NO
-
-# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
-# allowed to run in parallel. When set to 0 (the default) doxygen will
-# base this on the number of processors available in the system. You can set it
-# explicitly to a value larger than 0 to get control over the balance
-# between CPU load and processing speed.
-
-DOT_NUM_THREADS        = 0
-
-# By default doxygen will use the Helvetica font for all dot files that
-# doxygen generates. When you want a differently looking font you can specify
-# the font name using DOT_FONTNAME. You need to make sure dot is able to find
-# the font, which can be done by putting it in a standard location or by setting
-# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the
-# directory containing the font.
-
-DOT_FONTNAME           = Helvetica
-
-# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
-# The default size is 10pt.
-
-DOT_FONTSIZE           = 10
-
-# By default doxygen will tell dot to use the Helvetica font.
-# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to
-# set the path where dot can find it.
-
-DOT_FONTPATH           =
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect inheritance relations. Setting this tag to YES will force the
-# CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH            = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect implementation dependencies (inheritance, containment, and
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH    = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS           = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-
-UML_LOOK               = NO
-
-# If the UML_LOOK tag is enabled, the fields and methods are shown inside
-# the class node. If there are many fields or methods and many nodes the
-# graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS
-# threshold limits the number of items for each type to make the size more
-# managable. Set this to 0 for no limit. Note that the threshold may be
-# exceeded by 50% before the limit is enforced.
-
-UML_LIMIT_NUM_FIELDS   = 10
-
-# If set to YES, the inheritance and collaboration graphs will show the
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS     = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
-# tags are set to YES then doxygen will generate a graph for each documented
-# file showing the direct and indirect include dependencies of the file with
-# other documented files.
-
-INCLUDE_GRAPH          = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
-# documented header file showing the documented files that directly or
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH      = YES
-
-# If the CALL_GRAPH and HAVE_DOT options are set to YES then
-# doxygen will generate a call dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable call graphs
-# for selected functions only using the \callgraph command.
-
-CALL_GRAPH             = NO
-
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
-# doxygen will generate a caller dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable caller
-# graphs for selected functions only using the \callergraph command.
-
-CALLER_GRAPH           = NO
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
-# will generate a graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY    = YES
-
-# If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES
-# then doxygen will show the dependencies a directory has on other directories
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH        = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. Possible values are svg, png, jpg, or gif.
-# If left blank png will be used. If you choose svg you need to set
-# HTML_FILE_EXTENSION to xhtml in order to make the SVG files
-# visible in IE 9+ (other browsers do not have this requirement).
-
-DOT_IMAGE_FORMAT       = png
-
-# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
-# enable generation of interactive SVG images that allow zooming and panning.
-# Note that this requires a modern browser other than Internet Explorer.
-# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you
-# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files
-# visible. Older versions of IE do not have SVG support.
-
-INTERACTIVE_SVG        = NO
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH               =
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the
-# \dotfile command).
-
-DOTFILE_DIRS           =
-
-# The MSCFILE_DIRS tag can be used to specify one or more directories that
-# contain msc files that are included in the documentation (see the
-# \mscfile command).
-
-MSCFILE_DIRS           =
-
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
-# nodes that will be shown in the graph. If the number of nodes in a graph
-# becomes larger than this value, doxygen will truncate the graph, which is
-# visualized by representing a node as a red box. Note that doxygen if the
-# number of direct children of the root node in a graph is already larger than
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
-# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-
-DOT_GRAPH_MAX_NODES    = 50
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
-# graphs generated by dot. A depth value of 3 means that only nodes reachable
-# from the root by following a path via at most 3 edges will be shown. Nodes
-# that lay further from the root node will be omitted. Note that setting this
-# option to 1 or 2 may greatly reduce the computation time needed for large
-# code bases. Also note that the size of a graph can be further restricted by
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-
-MAX_DOT_GRAPH_DEPTH    = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, because dot on Windows does not
-# seem to support this out of the box. Warning: Depending on the platform used,
-# enabling this option may lead to badly anti-aliased labels on the edges of
-# a graph (i.e. they become hard to read).
-
-DOT_TRANSPARENT        = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10)
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS      = YES
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
-# generate a legend page explaining the meaning of the various boxes and
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND        = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
-# remove the intermediate dot files that are used to generate
-# the various graphs.
-
-DOT_CLEANUP            = YES
Index: c/Makefile.am
===================================================================
--- doc/Makefile.am	(revision 20)
+++ 	(revision )
@@ -1,1 +1,0 @@
-EXTRA_DIST=Doxyfile TracFooter.html TracHeader.html overview.dox
Index: c/TracFooter.html
===================================================================
--- doc/TracFooter.html	(revision 18)
+++ 	(revision )
@@ -1,1 +1,0 @@
-
Index: c/TracHeader.html
===================================================================
--- doc/TracHeader.html	(revision 18)
+++ 	(revision )
@@ -1,1 +1,0 @@
-
Index: c/overview.dox
===================================================================
--- doc/overview.dox	(revision 17)
+++ 	(revision )
@@ -1,142 +1,0 @@
-/*! \mainpage Very Simple Cross-Platform Library Documentation
- *
- * \section intro Introduction
- *
- * VSCPL is a simple library containing some useful classes related to
- * thread handling and I/O for POSIX and Windows systems. It is
- * intended to be extended eventually, but has been written chiefly
- * for the X-Plane Remote Access plugin and its client libraries,
- * which is reflected by the rather minimal functionality.
- *
- * To avoid namespace clashes, the classes of the library are put in
- * the \c hu::varadiistvan::scpl namespace or children of it.
- *
- * \subsection threading Threading
- *
- * The usual \ref hu::varadiistvan::scpl::Thread "thread" class and
- * some threading primitives are provided:
- * \ref hu::varadiistvan::scpl::Mutex "mutexes" and
- * \ref hu::varadiistvan::scpl::CondVar "conditional variables".
- *
- * \subsection io Input/Output
- *
- * The I/O parts are somewhat generic, but currently support
- * communication via so-called "local" sockets, which are Unix sockets
- * on POSIX and named pipes on Windows. Of course, a common interface
- * is provided, so the actual details are hidden.
- *
- * Input/output handling is based on the notion of a thread waiting
- * for one or more I/O events and then handling them. For this purpose
- * an instance of the \ref hu::varadiistvan::scpl::io::Waiter class
- * should be created and then this instance should be passed to the
- * instances of other classes. Waiting can be accomplished by calling
- * its \ref hu::varadiistvan::scpl::io::Waiter::wait "wait" function
- * and optionally passing a timeout.
- *
- * A local server socket can be created by instantiation the
- * \ref hu::varadiistvan::scpl::io::LocalServerSocket class. Besides
- * the waiter, it is given a name. It is ensured that if several users
- * of the computer run programs using the same name, each will see
- * their own socket.
- *
- * A server socket needs to accept incoming connections. For this
- * purpose and \ref hu::varadiistvan::scpl::io::LocalAcceptor
- * "acceptor" instance is used, which can be acquired by calling the
- * \ref hu::varadiistvan::scpl::io::LocalServerSocket::getAcceptor
- * "getAcceptor" function. To check, if there is an incoming
- * connection, call the acceptor's
- * \ref hu::varadiistvan::scpl::io::LocalAcceptor::accept "accept"
- * function. It returns immediately with a boolean telling whether
- * there is a connection. If so, you should call the
- * \ref hu::varadiistvan::scpl::io::LocalAcceptor::getSocket
- * "getSocket" function to get the socket representing the connection.
- * If there is no incoming connection, you can wait for one using the
- * waiter. Note, that
- * \ref hu::varadiistvan::scpl::io::LocalAcceptor::accept "accept"
- * should be called once unsuccessfully before trying to wait,
- * otherwise it is not guaranteed that waiting will finish if a new
- * connection comes in.
- *
- * \c LocalAcceptor is a subclass of
- * \ref hu::varadiistvan::scpl::io::Failable "Failable", which can be
- * used to check if some error occured. If \c accept returns \c false,
- * it should be check if the failure of accepting is due to an error,
- * or is caused simply by no client wanting to connect.
- *
- * A local client socket is created by instantiation
- * \ref hu::varadiistvan::scpl::io::LocalClientSocket. It receives the
- * same name as the server socket to which we want to
- * connect. Similarly to accepting a connection on a server socket,
- * the client socket's
- * \ref hu::varadiistvan::scpl::io::LocalClientSocket::getConnector
- * "getConnector" should be called to retrieve a
- * \ref hu::varadiistvan::scpl::io::LocalConnector "LocalConnector"
- * instance. Its
- * \ref hu::varadiistvan::scpl::io::LocalConnector::connect "connect"
- * member function should be called to initiate the connection. If it
- * returns \c true, the connection has succeeded. Otherwise one can
- * wait using the socket's waiter for the connection to succeed. If
- * waiting finishes, \c connect can be called again to check, if the
- * connection has been established. In case of a \c false return
- * value, the error condition should be checked here as well.
- *
- * Once the connection has been established, the actual communication
- * can begin. Both \c LocalSocket and \c LocalClientSocket are
- * subclasses of
- * \ref hu::varadiistvan::scpl::io::BufferedStream "BufferedStream".
- * It can be used to acquire an instance of
- * \ref hu::varadiistvan::scpl::io::ReadingBuffer "ReadingBuffer" for
- * reading, and an instance of
- * \ref hu::varadiistvan::scpl::io::WritingBuffer "WritingBuffer" for
- * writing.
- *
- * To read, call the
- * \ref hu::varadiistvan::scpl::io::ReadingBuffer::read "read"
- * function. It returns \c true, if reading has succeeded, \c false
- * otherwise which may indicate an error condition or simply the fact
- * that nothing has been received yet, in which case the program can
- * wait using the \c Waiter. If data has been read, it can be accessed
- * by the buffer's methods inherited from
- * \ref hu::varadiistvan::scpl::io::Buffer "Buffer". Before reading
- * again, the buffer's
- * \ref hu::varadiistvan::scpl::io::Buffer::reset "reset" function
- * should be called, otherwise \c read just returns \c true and
- * nothing happens.
- *
- * To write, put data into the writing buffer and call its
- * \ref hu::varadiistvan::scpl::io::WritingBuffer::write "write"
- * function. If all data in the buffer could be written, it returns
- * \c true, otherwise \c false, which, again, might indicate error,
- * but also the fact that not all data could be written. In this case,
- * the program can wait, and then retry writing again, and do this
- * until finally \c write returns \c true. If writing succeeds, the
- * buffer is reset automatically, and one can put new data into it.
- *
- * The facilities described above provide for asynchronous,
- * event-based stream handling, which is perfect for programs or
- * threads that should work with several streams, timeouts and
- * possibly other events simultaneously. This is, however, not always
- * the case. It might very well be that one thread is dedicated to
- * just deal with one stream only or at least with one stream at a
- * time. In such a case this hocus-pocus with always (re)trying
- * operations and waiting can be very cumbersome. It would be much
- * better to just call a function to read or write, which would return
- * only, if the requested operation has completed.
- *
- * This is provided by the
- * \ref hu::varadiistvan::scpl::io::BlockingStream class. Its
- * constructor receives and instance of \c BufferedStream, and it
- * provides blocking read, write and flushing operations. It also has
- * a \ref hu::varadiistvan::scpl::io::BlockingStream::interrupt "interrupt"
- * function, which can be called from another thread. If the stream is
- * blocking on an operation, that operation will then return with \c
- * false, and the interrupted condition can the be
- * \ref hu::varadiistvan::scpl::io::BlockingStream::isInterrupted
- * "checked".
- *
- * \c BlockingStream has a subclass called
- * \ref hu::varadiistvan::scpl::io::DataStream "DataStream", which can
- * be used to read and write values of the primitive data types. The
- * endianness is that of the  processor, i.e. no conversion is made to
- * a common one.
- */
Index: misc/vscpl.m4.in
===================================================================
--- misc/vscpl.m4.in	(revision 15)
+++ misc/vscpl.m4.in	(revision 0)
@@ -7,32 +7,15 @@
 
     AM_CONDITIONAL([TARGET_API_WIN32], test $_target_win32 -eq 0)
-
-    _target_win64="no"
+    AM_CONDITIONAL([TARGET_API_WIN64], test $_target_win32 -eq 0 -a "$host_cpu" = "x86_64")
+    AM_CONDITIONAL([TARGET_API_POSIX], test $_target_win32 -ne 0)
     if test $_target_win32 -eq 0; then
-        echo "host_alias: $host_alias"
-        case "$host_alias" in
-            x86_64*)
-                _target_win64="yes"
-                ;;
-        esac
-    fi
-    AM_CONDITIONAL([TARGET_API_WIN64], test "$_target_win64" = "yes")
-
-    AM_CONDITIONAL([TARGET_API_POSIX], test $_target_win32 -ne 0)
-    TARGET_API_POSIX=0
-    TARGET_API_WIN32=0
-    TARGET_API_WIN64=0
-    if test $_target_win32 -eq 0; then
-        if test "$_target_win64" = "yes"; then
-            TARGET_API_WIN64=1
+        if test "$host_cpu" = "x86_64"; then
+           AC_DEFINE([TARGET_API_WIN64], [1], [Define if the target is the 64-bit Win32 API.])
         fi
-        TARGET_API_WIN32=1
+        AC_DEFINE([TARGET_API_WIN32], [1], [Define if the target is the Win32 API.])
     else
-        TARGET_API_POSIX=1
+        AC_DEFINE([TARGET_API_POSIX], [1], [Define if the target is the POSIX API.])
     fi
 
-    AC_SUBST(TARGET_API_POSIX)
-    AC_SUBST(TARGET_API_WIN32)
-    AC_SUBST(TARGET_API_WIN64)
 ])
 
Index: c/hu/varadiistvan/scpl/.copyright
===================================================================
--- src/hu/varadiistvan/scpl/.copyright	(revision 1)
+++ 	(revision )
@@ -1,23 +1,0 @@
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
Index: c/hu/varadiistvan/scpl/.namespace
===================================================================
--- src/hu/varadiistvan/scpl/.namespace	(revision 1)
+++ 	(revision )
@@ -1,3 +1,0 @@
-hu
-varadiistvan
-scpl
Index: c/hu/varadiistvan/scpl/.srcmessage
===================================================================
--- src/hu/varadiistvan/scpl/.srcmessage	(revision 1)
+++ 	(revision )
@@ -1,1 +1,0 @@
-// This file is part of VSCPL, a simple cross-platform utility library
Index: c/hu/varadiistvan/scpl/CondVar.h
===================================================================
--- src/hu/varadiistvan/scpl/CondVar.h	(revision 6)
+++ 	(revision )
@@ -1,113 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_CONDVAR_H
-#define HU_VARADIISTVAN_SCPL_CONDVAR_H
-//------------------------------------------------------------------------------
-
-#if 0 // The public interface of CondVar
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl {
-
-//------------------------------------------------------------------------------
-
-class Mutex;
-
-//------------------------------------------------------------------------------
-
-/**
- * Condition variable.
- */
-class CondVar
-{
-public:
-    /**
-     * Wait for the condition variable.
-     *
-     * @param mutex the mutex to unlock and re-lock.
-     * @param timeout the number of milliseconds to wait at most. If
-     * negative, the function will wait indefinitely.
-     *
-     * @return true, if the condition variable was signalled, false
-     * if a timeout occured
-     */
-    bool wait(Mutex& mutex, int timeout = -1);
-
-    /**
-     * Signal the condition variable to wake up one thread.
-     */
-    void signal();
-
-    /**
-     * Signal all threads waiting on the condition variable.
-     */
-    void broadcast();
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-#endif // 0, The public interface of CondVar
-
-//------------------------------------------------------------------------------
-
-#include "hu/varadiistvan/scpl/config.h"
-
-//------------------------------------------------------------------------------
-
-#if TARGET_API_POSIX
-
-#include "_posix/CondVar.h"
-
-//------------------------------------------------------------------------------
-
-#elif TARGET_API_WIN32 || TARGET_API_WIN64
-
-#include "_win32/CondVar.h"
-
-//------------------------------------------------------------------------------
-
-#else
-
-#error "Not implemented for this target!"
-
-#endif
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_CONDVAR_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/Log.cc
===================================================================
--- src/hu/varadiistvan/scpl/Log.cc	(revision 35)
+++ 	(revision )
@@ -1,90 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "Log.h"
-
-#include <cstdio>
-#include <cstdarg>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::Log;
-
-//------------------------------------------------------------------------------
-
-namespace {
-
-//------------------------------------------------------------------------------
-
-std::function<void(const char*)> logFunction;
-
-//------------------------------------------------------------------------------
-
-} /* anonymous namespace */
-
-//------------------------------------------------------------------------------
-
-void Log::registerFunction(std::function<void(const char*)> fn)
-{
-    logFunction = fn;
-}
-
-//------------------------------------------------------------------------------
-
-void Log::log(const char* format, ...)
-{
-    if (logFunction) {
-        va_list ap;
-        va_start(ap, format);
-
-        char buf[256];
-        vsnprintf(buf, sizeof(buf), format, ap);
-
-        va_end(ap);
-
-        logFunction(buf);
-    } else {
-        va_list ap;
-        va_start(ap, format);
-
-        vprintf(format, ap);
-
-        va_end(ap);
-    }
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/Log.h
===================================================================
--- src/hu/varadiistvan/scpl/Log.h	(revision 35)
+++ 	(revision )
@@ -1,69 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#pragma once
-
-//------------------------------------------------------------------------------
-
-#include <functional>
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl {
-
-//------------------------------------------------------------------------------
-
-/**
- * Basic logging facility. A function may be registered to receive the log
- * entries. Otherwise, they are printed to the standard output.
- */
-class Log
-{
-public:
-    /**
-     * Register the given function to receive the formatted log entries.
-     */
-    static void registerFunction(std::function<void(const char*)> fn);
-
-    /**
-     * Print into the log
-     */
-    static void log(const char* format, ...);
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: src/hu/varadiistvan/scpl/Makefile.am
===================================================================
--- src/hu/varadiistvan/scpl/Makefile.am	(revision 36)
+++ src/hu/varadiistvan/scpl/Makefile.am	(revision 0)
@@ -1,39 +1,0 @@
-SUBDIRS=io
-
-if TARGET_API_POSIX
-SUBDIRS+=_posix
-AM_LDFLAGS=-lpthread
-endif
-
-if TARGET_API_WIN32
-SUBDIRS+=_win32
-AM_LDFLAGS=-no-undefined -lws2_32
-endif
-
-lib_LTLIBRARIES=libvscpl.la
-
-libvscpl_la_SOURCES=\
-	Log.cc 			\
-        PseudoRandom.cc
-
-libvscpl_la_LIBADD=
-
-if TARGET_API_POSIX
-libvscpl_la_LIBADD+=_posix/libvscpl_posix.la
-endif
-
-if TARGET_API_WIN32
-libvscpl_la_LIBADD+=_win32/libvscpl_win32.la
-endif
-
-libvscpl_la_LIBADD+=io/libvscpl_io.la
-
-include_vscpldir=$(includedir)/hu/varadiistvan/scpl
-include_vscpl_HEADERS=\
-        types.h                 \
-	Log.h			\
-        Thread.h                \
-        Mutex.h                 \
-        CondVar.h               \
-        PseudoRandom.h
-nodist_include_vscpl_HEADERS=config.h
Index: c/hu/varadiistvan/scpl/Mutex.h
===================================================================
--- src/hu/varadiistvan/scpl/Mutex.h	(revision 6)
+++ 	(revision )
@@ -1,105 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_MUTEX_H
-#define HU_VARADIISTVAN_SCPL_MUTEX_H
-//------------------------------------------------------------------------------
-
-#if 0 // The public interface of Mutex
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl {
-
-//------------------------------------------------------------------------------
-
-/**
- * A mutual exclusion device.
- */
-class Mutex
-{
-public:
-    /**
-     * Lock the mutex. If the mutex is locked by another thread, the
-     * caller one waits until the other thread releases the mutex.
-     */
-    void lock();
-
-    /**
-     * Try to lock the mutex. If the mutex is locked by another
-     * thread, this function returns false immediately. Otherwise it
-     * locks the mutex and returns true.
-     */
-    bool tryLock();
-
-    /**
-     * Unlock the mutex.
-     */
-    void unlock();
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-#endif // 0, The public interface of Mutex
-
-//------------------------------------------------------------------------------
-
-#include "hu/varadiistvan/scpl/config.h"
-
-//------------------------------------------------------------------------------
-
-#if TARGET_API_POSIX
-
-#include "_posix/Mutex.h"
-
-//------------------------------------------------------------------------------
-
-#elif TARGET_API_WIN32 || TARGET_API_WIN64
-
-#include "_win32/Mutex.h"
-
-//------------------------------------------------------------------------------
-
-#else
-
-#error "Not implemented for this target!"
-
-#endif
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_MUTEX_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/PseudoRandom.cc
===================================================================
--- src/hu/varadiistvan/scpl/PseudoRandom.cc	(revision 8)
+++ 	(revision )
@@ -1,65 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "PseudoRandom.h"
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::PseudoRandom;
-
-//------------------------------------------------------------------------------
-
-void PseudoRandom::initialize(uint32_t seed)
-{
-    vector[0] = seed;
-    for(size_t i = 1; i<vectorSize-3; ++i) {
-        int32_t x = (static_cast<long long>(16807) *
-                     static_cast<long long>(vector[i-1])) % 2147483647;
-        if (x<0) x += 2147483647;
-        vector[i] = x;
-    }
-    for(size_t i = vectorSize - 3; i<vectorSize; ++i) {
-        vector[i] = vector[i-31];
-    }
-
-    nextIndex = 0;
-
-    for(size_t i = vectorSize; i<numDiscarded; ++i) {
-        next();
-    }
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/PseudoRandom.h
===================================================================
--- src/hu/varadiistvan/scpl/PseudoRandom.h	(revision 8)
+++ 	(revision )
@@ -1,174 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_PSEUDORANDOM_H
-#define HU_VARADIISTVAN_SCPL_PSEUDORANDOM_H
-//------------------------------------------------------------------------------
-
-#include <cstdlib>
-#include <ctime>
-
-#include <inttypes.h>
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl {
-
-//------------------------------------------------------------------------------
-
-/**
- * A pseudo-random number generator. The algorithm is the same as
- * described in http://www.mathstat.dal.ca/~selinger/random, i.e. the
- * GNU libc random number generator. It is reimplemented, because
- * Windows does not provide a thread-safe, reentrable pseudo-random
- * number generation facility, so it should have been implemented for
- * Win32 anyway.
- */
-class PseudoRandom
-{
-public:
-    /**
-     * The largest random number generated in the unconverted
-     * sequence.
-     */
-    static const uint32_t MAX = (1<<31);
-
-private:
-    /**
-     * The size of the vector.
-     */
-    static const size_t vectorSize = 34;
-
-    /**
-     * The number of random numbers thrown away.
-     */
-    static const size_t numDiscarded = 344;
-
-    /**
-     * The vector of random numbers used to generate the next one.
-     */
-    uint32_t vector[vectorSize];
-
-    /**
-     * The index of the next random number.
-     */
-    int nextIndex;
-
-public:
-    /**
-     * Construct the random number generator with a default seed
-     * (taken by calling time()).
-     */
-    PseudoRandom();
-
-    /**
-     * Construct the random number generator with the given seed.
-     */
-    PseudoRandom(uint32_t seed);
-
-    /**
-     * Get the next raw value.
-     */
-    uint32_t next();
-
-    /**
-     * Get the next random number as an unsigned value between [from, to].
-     */
-    unsigned nextUnsigned(unsigned to = MAX, unsigned from=0);
-
-    /**
-     * Get the next random number as a double value between [from,
-     * to].
-     */
-    double nextDouble(double to = 1.0, double from= 0.0);
-
-private:
-    /**
-     * Initialize the random number generator with the given seed.
-     */
-    void initialize(uint32_t seed);
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline PseudoRandom::PseudoRandom()
-{
-    initialize(time(0));
-}
-
-//------------------------------------------------------------------------------
-
-inline PseudoRandom::PseudoRandom(uint32_t seed)
-{
-    initialize(seed);
-}
-
-//------------------------------------------------------------------------------
-
-inline uint32_t PseudoRandom::next()
-{
-    int i1 = (nextIndex<3) ? (vectorSize + nextIndex - 3) : (nextIndex - 3);
-    int i2 = (nextIndex<31) ? (vectorSize + nextIndex - 31) : (nextIndex - 31);
-
-    vector[nextIndex] = vector[i1] + vector[i2];
-    uint32_t x = vector[nextIndex]>>1;
-
-    ++nextIndex; if (nextIndex>=static_cast<int>(vectorSize)) nextIndex = 0;
-
-    return x;
-}
-
-//------------------------------------------------------------------------------
-
-inline unsigned PseudoRandom::nextUnsigned(unsigned to, unsigned from)
-{
-    return from + static_cast<unsigned>(static_cast<double>(to - from) * next()
-                                        / static_cast<double>(MAX));
-}
-
-//------------------------------------------------------------------------------
-
-inline double PseudoRandom::nextDouble(double to, double from)
-{
-    return from + (to-from) * next() / static_cast<double>(MAX);
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_PSEUDORANDOM_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/Thread.h
===================================================================
--- src/hu/varadiistvan/scpl/Thread.h	(revision 6)
+++ 	(revision )
@@ -1,126 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_THREAD_H
-#define HU_VARADIISTVAN_SCPL_THREAD_H
-//------------------------------------------------------------------------------
-
-// The public interface of the Thread class common to all platforms
-#if 0
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl {
-
-//------------------------------------------------------------------------------
-
-/**
- * A thread
- */
-class Thread
-{
-public:
-    /**
-     * Sleep for the given number of milliseconds.
-     */
-    static void sleep(unsigned millis);
-
-public:
-    /**
-     * Construct the thread.
-     *
-     * @param detached if true, the thread will be created as a
-     * detached one, i.e. it can't be joined later on. The thread
-     * object will also be deleted when its run() function has
-     * finished.
-     */
-    Thread(bool detached = false);
-
-    /**
-     * Virtual destructor.
-     */
-    virtual ~Thread();
-
-    /**
-     * Start the thread.
-     *
-     * @return if the thread could be started
-     */
-    bool start();
-
-    /**
-     * Perform the thread's real operation. To be implemented in children
-     */
-    virtual void run() = 0;
-
-    /**
-     * Wait for the thread to quit.
-     */
-    void join();
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-#endif // 0, The public interface of the Thread class common to all platforms
-
-//------------------------------------------------------------------------------
-
-#include "hu/varadiistvan/scpl/config.h"
-
-//------------------------------------------------------------------------------
-
-#if TARGET_API_POSIX
-
-#include "_posix/Thread.h"
-
-//------------------------------------------------------------------------------
-
-#elif TARGET_API_WIN32 || TARGET_API_WIN64
-
-#include "_win32/Thread.h"
-
-//------------------------------------------------------------------------------
-
-#else
-
-#error "Not implemented for this target!"
-
-#endif
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_THREAD_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/_posix/.copyright
===================================================================
--- src/hu/varadiistvan/scpl/_posix/.copyright	(revision 1)
+++ 	(revision )
@@ -1,23 +1,0 @@
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
Index: c/hu/varadiistvan/scpl/_posix/.namespace
===================================================================
--- src/hu/varadiistvan/scpl/_posix/.namespace	(revision 1)
+++ 	(revision )
@@ -1,3 +1,0 @@
-hu
-varadiistvan
-scpl
Index: c/hu/varadiistvan/scpl/_posix/.srcmessage
===================================================================
--- src/hu/varadiistvan/scpl/_posix/.srcmessage	(revision 1)
+++ 	(revision )
@@ -1,1 +1,0 @@
-// This file is part of VSCPL, a simple cross-platform utility library
Index: c/hu/varadiistvan/scpl/_posix/CondVar.cc
===================================================================
--- src/hu/varadiistvan/scpl/_posix/CondVar.cc	(revision 5)
+++ 	(revision )
@@ -1,60 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "CondVar.h"
-
-#include <sys/time.h>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::CondVar;
-
-//------------------------------------------------------------------------------
-
-void CondVar::getAbsTime(struct ::timespec& abstime, int timeout)
-{
-    struct timeval tv;
-    gettimeofday(&tv, 0);
-
-    abstime.tv_sec = tv.tv_sec + timeout / 1000;
-    abstime.tv_nsec = (tv.tv_usec + (timeout%1000) * 1000) * 1000;
-    if (abstime.tv_nsec>=1000000000) {
-        ++abstime.tv_sec;
-        abstime.tv_nsec -= 1000000000;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/_posix/CondVar.h
===================================================================
--- src/hu/varadiistvan/scpl/_posix/CondVar.h	(revision 6)
+++ 	(revision )
@@ -1,147 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_POSIX_CONDVAR_H
-#define HU_VARADIISTVAN_SCPL_POSIX_CONDVAR_H
-//------------------------------------------------------------------------------
-
-#include "Mutex.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl {
-
-//------------------------------------------------------------------------------
-
-/**
- * A condition variable for POSIX threads.
- */
-class CondVar
-{
-private:
-    /**
-     * Fill the given timespec with the absolute time corresponding to
-     * the given relative timeout.
-     */
-    static void getAbsTime(struct ::timespec& abstime, int timeout);
-
-    /**
-     * The pthreads structure.
-     */
-    pthread_cond_t cond;
-
-public:
-    /**
-     * Construct the condition variable.
-     */
-    CondVar();
-
-    /**
-     * Destroy the condition variable.
-     */
-    ~CondVar();
-
-    /**
-     * Wait for the condition variable.
-     *
-     * @param mutex the mutex to unlock and re-lock.
-     * @param timeout the number of milliseconds to wait at most. If
-     * negative, the function will wait indefinitely.
-     *
-     * @return true, if the condition variable was signalled, false
-     * if a timeout occured
-     */
-    bool wait(Mutex& mutex, int timeout = -1);
-
-    /**
-     * Signal the condition variable to wake up one thread.
-     */
-    void signal();
-
-    /**
-     * Signal all threads waiting on the condition variable.
-     */
-    void broadcast();
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline CondVar::CondVar()
-{
-    pthread_cond_init(&cond, 0);
-}
-
-//------------------------------------------------------------------------------
-
-inline CondVar::~CondVar()
-{
-    pthread_cond_destroy(&cond);
-}
-
-//------------------------------------------------------------------------------
-
-inline bool CondVar::wait(Mutex& mutex, int timeout)
-{
-    if (timeout<0) {
-        pthread_cond_wait(&cond, &mutex.mutex);
-        return true;
-    } else {
-        struct ::timespec abstime;
-        getAbsTime(abstime, timeout);
-        return pthread_cond_timedwait(&cond, &mutex.mutex, &abstime)==0;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-inline void CondVar::signal()
-{
-    pthread_cond_signal(&cond);
-}
-
-//------------------------------------------------------------------------------
-
-inline void CondVar::broadcast()
-{
-    pthread_cond_broadcast(&cond);
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_CONDVAR_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/_posix/Makefile.am
===================================================================
--- src/hu/varadiistvan/scpl/_posix/Makefile.am	(revision 5)
+++ 	(revision )
@@ -1,11 +1,0 @@
-noinst_LTLIBRARIES=libvscpl_posix.la
-
-libvscpl_posix_la_SOURCES =	\
-	Thread.cc		\
-	CondVar.cc
-
-include_vscpl_posixdir=$(includedir)/hu/varadiistvan/scpl/_posix
-include_vscpl_posix_HEADERS=\
-	Thread.h		\
-	Mutex.h			\
-	CondVar.h
Index: c/hu/varadiistvan/scpl/_posix/Mutex.h
===================================================================
--- src/hu/varadiistvan/scpl/_posix/Mutex.h	(revision 6)
+++ 	(revision )
@@ -1,132 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_POSIX_MUTEX_H
-#define HU_VARADIISTVAN_SCPL_POSIX_MUTEX_H
-//------------------------------------------------------------------------------
-
-#include <pthread.h>
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl {
-
-//------------------------------------------------------------------------------
-
-/**
- * Mutual exclusion device for POSIX threads.
- */
-class Mutex
-{
-private:
-    /**
-     * The mutex structure.
-     */
-    pthread_mutex_t mutex;
-
-public:
-    /**
-     * Construct the mutex.
-     */
-    Mutex();
-
-    /**
-     * Destroy the mutex.
-     */
-    ~Mutex();
-
-    /**
-     * Lock the mutex. If the mutex is locked by another thread, the
-     * caller one waits until the other thread releases the mutex.
-     */
-    void lock();
-
-    /**
-     * Try to lock the mutex. If the mutex is locked by another
-     * thread, this function returns false immediately. Otherwise it
-     * locks the mutex and returns true.
-     */
-    bool tryLock();
-
-    /**
-     * Unlock the mutex.
-     */
-    void unlock();
-
-    friend class CondVar;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline Mutex::Mutex()
-{
-    pthread_mutex_init(&mutex, 0);
-}
-
-//------------------------------------------------------------------------------
-
-inline Mutex::~Mutex()
-{
-    pthread_mutex_destroy(&mutex);
-}
-
-//------------------------------------------------------------------------------
-
-inline void Mutex::lock()
-{
-    pthread_mutex_lock(&mutex);
-}
-
-//------------------------------------------------------------------------------
-
-inline bool Mutex::tryLock()
-{
-    return pthread_mutex_trylock(&mutex)==0;
-}
-
-//------------------------------------------------------------------------------
-
-inline void Mutex::unlock()
-{
-    pthread_mutex_unlock(&mutex);
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_POSIX_MUTEX_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/_posix/Thread.cc
===================================================================
--- src/hu/varadiistvan/scpl/_posix/Thread.cc	(revision 1)
+++ 	(revision )
@@ -1,66 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "Thread.h"
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::Thread;
-
-//------------------------------------------------------------------------------
-
-void* Thread::threadFn(void* arg)
-{
-    Thread* thread = reinterpret_cast<Thread*>(arg);
-    thread->run();
-    if (thread->detached) delete thread;
-    return 0;
-}
-
-//------------------------------------------------------------------------------
-
-bool Thread::start()
-{
-    pthread_attr_t attr;
-    pthread_attr_init(&attr);
-    pthread_attr_setdetachstate(&attr, detached ? PTHREAD_CREATE_DETACHED :
-                                PTHREAD_CREATE_JOINABLE);
-    bool isOK = pthread_create(&thread, &attr, &threadFn, this)>=0;
-    pthread_attr_destroy(&attr);
-    return isOK;
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/_posix/Thread.h
===================================================================
--- src/hu/varadiistvan/scpl/_posix/Thread.h	(revision 1)
+++ 	(revision )
@@ -1,138 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_POSIX_THREAD_H
-#define HU_VARADIISTVAN_SCPL_POSIX_THREAD_H
-//------------------------------------------------------------------------------
-
-#include <pthread.h>
-#include <unistd.h>
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl {
-
-//------------------------------------------------------------------------------
-
-/**
- * A pthreads-based thread implementation.
- */
-class Thread
-{
-public:
-    /**
-     * Sleep for the given number of milliseconds.
-     */
-    static void sleep(unsigned millis);
-
-private:
-    /**
-     * The thread-runner function.
-     */
-    static void* threadFn(void* arg);
-
-    /**
-     * Indicate if the thread is detached or not.
-     */
-    bool detached;
-
-    /**
-     * The posix thread handle.
-     */
-    pthread_t thread;
-
-public:
-    /**
-     * Construct the thread
-     */
-    Thread(bool detached = false);
-
-    /**
-     * Virtual destructor.
-     */
-    virtual ~Thread();
-
-    /**
-     * Start the thread.
-     *
-     * @return if the thread could be started
-     */
-    bool start();
-
-    /**
-     * Perform the thread's real operation.
-     */
-    virtual void run() = 0;
-
-    /**
-     * Wait for the thread to quit.
-     */
-    void join();
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline void Thread::sleep(unsigned millis)
-{
-    usleep(static_cast<useconds_t>(millis)*1000);
-}
-
-//------------------------------------------------------------------------------
-
-inline Thread::Thread(bool detached) :
-    detached(detached)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline Thread::~Thread()
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline void Thread::join()
-{
-    pthread_join(thread, 0);
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_POSIX_THREAD_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/_win32/.copyright
===================================================================
--- src/hu/varadiistvan/scpl/_win32/.copyright	(revision 1)
+++ 	(revision )
@@ -1,23 +1,0 @@
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
Index: c/hu/varadiistvan/scpl/_win32/.namespace
===================================================================
--- src/hu/varadiistvan/scpl/_win32/.namespace	(revision 1)
+++ 	(revision )
@@ -1,3 +1,0 @@
-hu
-varadiistvan
-scpl
Index: c/hu/varadiistvan/scpl/_win32/.srcmessage
===================================================================
--- src/hu/varadiistvan/scpl/_win32/.srcmessage	(revision 1)
+++ 	(revision )
@@ -1,1 +1,0 @@
-// This file is part of VSCPL, a simple cross-platform utility library
Index: c/hu/varadiistvan/scpl/_win32/CondVar.cc
===================================================================
--- src/hu/varadiistvan/scpl/_win32/CondVar.cc	(revision 5)
+++ 	(revision )
@@ -1,87 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "CondVar.h"
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::CondVar;
-
-//------------------------------------------------------------------------------
-
-bool CondVar::wait(Mutex& inMutex, int timeout)
-{
-    mutex.lock();
-    ++numWaiters;
-    size_t generation = waitGeneration;
-    mutex.unlock();
-
-    inMutex.unlock();
-
-    bool lastWaiter = false;
-    bool wokenUp = false;
-    bool waitDone = false;
-    while (!waitDone) {
-        int result = WaitForSingleObject(event,
-                                         (timeout<0) ? INFINITE : timeout);
-        if (result==WAIT_OBJECT_0) {
-            mutex.lock();
-            waitDone = numToRelease>0 && generation!=waitGeneration;
-            if (waitDone) {
-                --numToRelease;
-                lastWaiter = numToRelease == 0;
-                wokenUp = true;
-            }
-            mutex.unlock();
-        } else {
-            waitDone = true;
-        }
-    }
-
-    inMutex.lock();
-
-    mutex.lock();
-    --numWaiters;
-    mutex.unlock();
-
-    if (lastWaiter) {
-        ResetEvent(event);
-    }
-
-    return wokenUp;
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/_win32/CondVar.h
===================================================================
--- src/hu/varadiistvan/scpl/_win32/CondVar.h	(revision 6)
+++ 	(revision )
@@ -1,168 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_WIN32_CONDVAR_H
-#define HU_VARADIISTVAN_SCPL_WIN32_CONDVAR_H
-//------------------------------------------------------------------------------
-
-#include "Mutex.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl {
-
-//------------------------------------------------------------------------------
-
-
-/**
- * A condition variable for the Win32 API.
- *
- * Note: the CONDITION_VARIABLE structure and the associated functions
- * are available only starting with the Windows Vista API. However,
- * for the time being we also want to support Windows XP, hence this
- * rather fancy implementation.
- */
-class CondVar
-{
-private:
-    /**
-     * The mutex protecting the internal data structures.
-     */
-    Mutex mutex;
-
-    /**
-     * The number of waiters.
-     */
-    size_t numWaiters;
-
-    /**
-     * The wait generation.
-     */
-    size_t waitGeneration;
-
-    /**
-     * The number of waiters to release.
-     */
-    size_t numToRelease;
-
-    /**
-     * The event to use for waiting.
-     */
-    HANDLE event;
-
-public:
-    /**
-     * Construct the condition variable.
-     */
-    CondVar();
-
-    /**
-     * Destroy the condition variable.
-     */
-    ~CondVar();
-
-    /**
-     * Wait for the condition variable.
-     *
-     * @param mutex the mutex to unlock and re-lock.
-     * @param timeout the number of milliseconds to wait at most. If
-     * negative, the function will wait indefinitely.
-     *
-     * @return true, if the condition variable was signalled, false
-     * if a timeout occured
-     */
-    bool wait(Mutex& inMutex, int timeout = -1);
-
-    /**
-     * Signal the condition variable to wake up one thread.
-     */
-    void signal();
-
-    /**
-     * Signal all threads waiting on the condition variable.
-     */
-    void broadcast();
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline CondVar::CondVar() :
-    numWaiters(0),
-    waitGeneration(0),
-    numToRelease(0)
-{
-    event  = CreateEvent(0, true, false, 0);
-}
-
-//------------------------------------------------------------------------------
-
-inline CondVar::~CondVar()
-{
-    CloseHandle(event);
-}
-
-//------------------------------------------------------------------------------
-
-inline void CondVar::signal()
-{
-    mutex.lock();
-    if (numWaiters>numToRelease) {
-        SetEvent(event);
-        ++numToRelease;
-        ++waitGeneration;
-    }
-    mutex.unlock();
-}
-
-//------------------------------------------------------------------------------
-
-inline void CondVar::broadcast()
-{
-    mutex.lock();
-    if (numWaiters>0) {
-        SetEvent(event);
-        numToRelease = numWaiters;
-        ++waitGeneration;
-    }
-    mutex.unlock();
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_WIN32_CONDVAR_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/_win32/Makefile.am
===================================================================
--- src/hu/varadiistvan/scpl/_win32/Makefile.am	(revision 13)
+++ 	(revision )
@@ -1,11 +1,0 @@
-noinst_LTLIBRARIES=libvscpl_win32.la
-
-libvscpl_win32_la_SOURCES =	\
-	Thread.cc		\
-	CondVar.cc
-
-include_win32_posixdir=$(includedir)/hu/varadiistvan/scpl/_win32
-include_win32_posix_HEADERS=\
-	Thread.h		\
-	Mutex.h			\
-	CondVar.h
Index: c/hu/varadiistvan/scpl/_win32/Mutex.h
===================================================================
--- src/hu/varadiistvan/scpl/_win32/Mutex.h	(revision 6)
+++ 	(revision )
@@ -1,132 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_WIN32_MUTEX_H
-#define HU_VARADIISTVAN_SCPL_WIN32_MUTEX_H
-//------------------------------------------------------------------------------
-
-#include <windows.h>
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl {
-
-//------------------------------------------------------------------------------
-
-/**
- * Mutual exclusion device implementation for Windows.
- */
-class Mutex
-{
-private:
-    /**
-     * The handle of the mutex.
-     */
-    CRITICAL_SECTION mutex;
-
-public:
-    /**
-     * Construct the mutex.
-     */
-    Mutex();
-
-    /**
-     * Destroy the mutex.
-     */
-    ~Mutex();
-
-    /**
-     * Lock the mutex. If the mutex is locked by another thread, the
-     * caller one waits until the other thread releases the mutex.
-     */
-    void lock();
-
-    /**
-     * Try to lock the mutex. If the mutex is locked by another
-     * thread, this function returns false immediately. Otherwise it
-     * locks the mutex and returns true.
-     */
-    bool tryLock();
-
-    /**
-     * Unlock the mutex.
-     */
-    void unlock();
-
-    friend class CondVar;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline Mutex::Mutex()
-{
-    InitializeCriticalSection(&mutex);
-}
-
-//------------------------------------------------------------------------------
-
-inline Mutex::~Mutex()
-{
-    DeleteCriticalSection(&mutex);
-}
-
-//------------------------------------------------------------------------------
-
-inline void Mutex::lock()
-{
-    EnterCriticalSection(&mutex);
-}
-
-//------------------------------------------------------------------------------
-
-inline bool Mutex::tryLock()
-{
-    return TryEnterCriticalSection(&mutex);
-}
-
-//------------------------------------------------------------------------------
-
-inline void Mutex::unlock()
-{
-    LeaveCriticalSection(&mutex);
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_WIN32_MUTEX_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/_win32/Thread.cc
===================================================================
--- src/hu/varadiistvan/scpl/_win32/Thread.cc	(revision 1)
+++ 	(revision )
@@ -1,56 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "Thread.h"
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::Thread;
-
-//------------------------------------------------------------------------------
-
-DWORD Thread::threadFn(LPVOID arg)
-{
-    Thread* thread = reinterpret_cast<Thread*>(arg);
-
-    thread->run();
-
-    if (thread->detached) delete thread;
-
-    return 0;
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/_win32/Thread.h
===================================================================
--- src/hu/varadiistvan/scpl/_win32/Thread.h	(revision 1)
+++ 	(revision )
@@ -1,156 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_WIN32_THREAD_H
-#define HU_VARADIISTVAN_SCPL_WIN32_THREAD_H
-//------------------------------------------------------------------------------
-
-#include <windows.h>
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl {
-
-//------------------------------------------------------------------------------
-
-/**
- * A Win32 API thread implementation.
- */
-class Thread
-{
-public:
-    /**
-     * Sleep for the given number of milliseconds.
-     */
-    static void sleep(unsigned millis);
-
-private:
-    /**
-     * The thread-runner function.
-     */
-    static DWORD WINAPI threadFn(LPVOID arg);
-
-    /**
-     * Indicate if the thread is detached.
-     */
-    bool detached;
-
-    /**
-     * The thread handle.
-     */
-    HANDLE handle;
-
-public:
-    /**
-     * Construct the thread object.
-     */
-    Thread(bool detached = false);
-
-    /**
-     * Virtual destructor.
-     */
-    virtual ~Thread();
-
-    /**
-     * Start the thread.
-     *
-     * @return if the thread could be started
-     */
-    bool start();
-
-    /**
-     * Perform the thread's real operation.
-     */
-    virtual void run() = 0;
-
-    /**
-     * Wait for the thread to quit.
-     */
-    void join();
-
-    void release();
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline void Thread::sleep(unsigned millis)
-{
-    Sleep(millis);
-}
-
-//------------------------------------------------------------------------------
-
-inline Thread::Thread(bool detached) :
-    detached(detached),
-    handle(0)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline Thread::~Thread()
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline bool Thread::start()
-{
-    handle = CreateThread(0, 0, &threadFn, this, 0, 0);
-    bool isOK = handle!=0;
-    if (detached && handle!=0) {
-        CloseHandle(handle);
-        handle = 0;
-    }
-    return isOK;
-}
-
-//------------------------------------------------------------------------------
-
-inline void Thread::join()
-{
-    if (handle!=0) {
-        WaitForSingleObject(handle, INFINITE);
-        CloseHandle(handle);
-    }
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_WIN32_THREAD_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: src/hu/varadiistvan/scpl/config.h.in
===================================================================
--- src/hu/varadiistvan/scpl/config.h.in	(revision 1)
+++ src/hu/varadiistvan/scpl/config.h.in	(revision 0)
@@ -1,10 +1,77 @@
-// Define to 1, if the library is compiled for the POSIX API
-#define TARGET_API_POSIX @TARGET_API_POSIX@
+/* src/hu/varadiistvan/scpl/config.h.in.  Generated from configure.ac by autoheader.  */
 
-// Define to 1, if the library is compiled for the 32- or 64-bit
-// Win32 API
-#define TARGET_API_WIN32 @TARGET_API_WIN32@
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
 
-// Define to 1, if the library is compiled for the 64-bit
-// Win32 API
-#define TARGET_API_WIN64 @TARGET_API_WIN64@
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the <windows.h> header file. */
+#undef HAVE_WINDOWS_H
+
+/* Define to 1 if you have the <winsock2.h> header file. */
+#undef HAVE_WINSOCK2_H
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+   */
+#undef LT_OBJDIR
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define if the target is the POSIX API. */
+#undef TARGET_API_POSIX
+
+/* Define if the target is the Win32 API. */
+#undef TARGET_API_WIN32
+
+/* Define if the target is the 64-bit Win32 API. */
+#undef TARGET_API_WIN64
+
+/* Version number of package */
+#undef VERSION
Index: c/hu/varadiistvan/scpl/hgccwrapper
===================================================================
--- src/hu/varadiistvan/scpl/hgccwrapper	(revision 6)
+++ 	(revision )
@@ -1,96 +1,0 @@
-#!/bin/sh
-
-# Create a skeleton of a wrapper header for a certain class
-
-classname=$1
-uppername=`echo ${classname} | tr a-z A-Z`
-
-cat > "${classname}.h" <<EOF
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_${uppername}_H
-#define HU_VARADIISTVAN_SCPL_${uppername}_H
-//------------------------------------------------------------------------------
-
-#if 0 // The public interface of ${classname}
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl {
-
-//------------------------------------------------------------------------------
-
-class ${classname}
-{
-public:
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-#endif // 0, The public interface of ${classname}
-
-//------------------------------------------------------------------------------
-
-#include "hu/varadistvan/scpl/config.h"
-
-//------------------------------------------------------------------------------
-
-#if TARGET_API_POSIX
-
-#include "_posix/${classname}.h"
-
-//------------------------------------------------------------------------------
-
-#elif TARGET_API_WIN32 || TARGET_API_WIN64
-
-#include "_win32/${classname}.h"
-
-//------------------------------------------------------------------------------
-
-#else
-
-#error "Not implemented for this target!"
-
-#endif
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_${uppername}_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
-EOF
-
-hg add "${classname}.h"
Index: c/hu/varadiistvan/scpl/io/.copyright
===================================================================
--- src/hu/varadiistvan/scpl/io/.copyright	(revision 6)
+++ 	(revision )
@@ -1,23 +1,0 @@
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
Index: c/hu/varadiistvan/scpl/io/.namespace
===================================================================
--- src/hu/varadiistvan/scpl/io/.namespace	(revision 6)
+++ 	(revision )
@@ -1,4 +1,0 @@
-hu
-varadiistvan
-scpl
-io
Index: c/hu/varadiistvan/scpl/io/.srcmessage
===================================================================
--- src/hu/varadiistvan/scpl/io/.srcmessage	(revision 6)
+++ 	(revision )
@@ -1,1 +1,0 @@
-// This file is part of VSCPL, a simple cross-platform utility library
Index: c/hu/varadiistvan/scpl/io/BlockingStream.cc
===================================================================
--- src/hu/varadiistvan/scpl/io/BlockingStream.cc	(revision 10)
+++ 	(revision )
@@ -1,175 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "BlockingStream.h"
-
-#include "ReadingBuffer.h"
-#include "WritingBuffer.h"
-#include "Waiter.h"
-
-#include <cstring>
-#include <cstdio>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::BlockingStream;
-
-using std::min;
-
-//------------------------------------------------------------------------------
-
-inline bool BlockingStream::checkInterrupted()
-{
-    if (!interrupted) {
-        interrupted = event.check();
-        if (!interrupted && event.failed()) {
-            setErrorCode(event.getErrorCode());
-        }
-    }
-
-    return interrupted;
-}
-
-//------------------------------------------------------------------------------
-
-bool BlockingStream::read(void* dest, size_t length)
-{
-    unsigned char* d = reinterpret_cast<unsigned char*>(dest);
-
-    ReadingBuffer& readingBuffer = stream.getReadingBuffer();
-    while (length>0) {
-        size_t copied = readingBuffer.extract(d, length, readingOffset);
-        readingOffset += copied;
-        length -= copied;
-        d += copied;
-
-        if (length!=0) {
-            if (!fill()) return false;
-        }
-    }
-
-    return true;
-}
-
-//------------------------------------------------------------------------------
-
-bool BlockingStream::skip(size_t length)
-{
-    ReadingBuffer& readingBuffer = stream.getReadingBuffer();
-    while (length>0) {
-        size_t toSkip = min(length, readingBuffer.getLength() - readingOffset);
-        readingOffset += toSkip;
-        length -= toSkip;
-
-        if (length!=0) {
-            if (!fill()) return false;
-        }
-    }
-
-    return true;
-}
-
-//------------------------------------------------------------------------------
-
-bool BlockingStream::write(const void* src, size_t length)
-{
-    const unsigned char* s = reinterpret_cast<const unsigned char*>(src);
-
-    WritingBuffer& writingBuffer = stream.getWritingBuffer();
-    while(length>0) {
-        size_t copied = writingBuffer.append(s, length);
-        length -= copied;
-        s += copied;
-
-        if (length==0) break;
-        if (!flush()) return false;
-    }
-
-    return true;
-}
-
-//------------------------------------------------------------------------------
-
-bool BlockingStream::flush()
-{
-    WritingBuffer& writingBuffer = stream.getWritingBuffer();
-    while (*this) {
-        if (checkInterrupted()) return false;
-
-        if (writingBuffer.write()) {
-            return true;
-        } else if (writingBuffer.failed()) {
-            setErrorCode(writingBuffer.getErrorCode());
-        } else {
-            Waiter* waiter = stream.getWaiter();
-            waiter->wait();
-            if (waiter->failed()) {
-                setErrorCode(waiter->getErrorCode());
-            }
-        }
-    }
-    return false;
-}
-
-//------------------------------------------------------------------------------
-
-bool BlockingStream::fill()
-{
-    ReadingBuffer& readingBuffer = stream.getReadingBuffer();
-
-    readingBuffer.reset();
-    readingOffset = 0;
-    while (*this) {
-        if (checkInterrupted()) return false;
-
-        if (readingBuffer.read()) {
-            eof = readingBuffer.isEmpty();
-            return !eof;
-        } else if (readingBuffer.failed()) {
-            setErrorCode(readingBuffer.getErrorCode());
-        } else {
-            Waiter* waiter = stream.getWaiter();
-            waiter->wait();
-            if (waiter->failed()) {
-                setErrorCode(waiter->getErrorCode());
-                return false;
-            }
-        }
-    }
-    return false;
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/BlockingStream.h
===================================================================
--- src/hu/varadiistvan/scpl/io/BlockingStream.h	(revision 10)
+++ 	(revision )
@@ -1,197 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_BLOCKINGSTREAM_H
-#define HU_VARADIISTVAN_SCPL_IO_BLOCKINGSTREAM_H
-//------------------------------------------------------------------------------
-
-#include "Failable.h"
-
-#include "BufferedStream.h"
-#include "WaitableEvent.h"
-
-#include <cstdlib>
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * Wrapper for a buffered stream, which an event and provides
- * blocking, but interruptible read() and write() operations.
- *
- * The class is designed in a way, that it expects its constructed
- * instances to be called only from a single thread at a time, except
- * for the interrupt() function, which may be called from another
- * thread anytime.
- */
-class BlockingStream : public Failable
-{
-private:
-    /**
-     * The buffered stream used.
-     */
-    BufferedStream& stream;
-
-    /**
-     * The waitable event.
-     */
-    WaitableEvent event;
-
-    /**
-     * Indicate if we are interrupted.
-     */
-    bool interrupted;
-
-    /**
-     * The offset in the buffer of the reading stream.
-     */
-    size_t readingOffset;
-
-    /**
-     * Indicate if the end-of-file has been reached while reading.
-     */
-    bool eof;
-
-public:
-    /**
-     * Construct the blocking stream for the given buffered stream.
-     *
-     * The stream must have a waiter which is used for waiting.
-     */
-    BlockingStream(BufferedStream& stream);
-
-    /**
-     * Determine if the stream has neither failed nor been
-     * interrupted.
-     */
-    operator bool() const;
-
-    /**
-     * Interrupt the stream. Pending or future read and write calls
-     * will return indicating error. The isInterrupted() function can
-     * be used to check if the stream was interrupted or not.
-     */
-    void interrupt();
-
-    /**
-     * Indicate if the stream is interrupted or not.
-     */
-    bool isInterrupted();
-
-    /**
-     * Read the given number of bytes into the given buffer.
-     *
-     * @return if the reading has succeeded
-     */
-    bool read(void* dest, size_t length);
-
-    /**
-     * Skip the given number of bytes.
-     */
-    bool skip(size_t length);
-
-    /**
-     * Write the given number of bytes from the given buffer. The data
-     * may not be written to the underlying stream fully, so if you
-     * want to make sure that it is sent, call flush() afterwards.
-     *
-     * @return true on success, false on error.
-     */
-    bool write(const void* src, size_t length);
-
-    /**
-     * Flush anything written so far into the buffer, but not to the
-     * underlying stream.
-     *
-     * @return whether the operation has succeeded.
-     */
-    bool flush();
-
-private:
-    /**
-     * Fill the buffer with data from the stream.
-     */
-    bool fill();
-
-    /**
-     * Check for the stream being interrupted.
-     *
-     * @return if the stream is interrupted, false otherwise
-     */
-    bool checkInterrupted();
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline BlockingStream::BlockingStream(BufferedStream& stream) :
-    stream(stream),
-    event(stream.getWaiter()),
-    interrupted(false),
-    readingOffset(0),
-    eof(false)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline BlockingStream::operator bool() const
-{
-    return !failed() && !interrupted && !eof;
-}
-
-//------------------------------------------------------------------------------
-
-inline void BlockingStream::interrupt()
-{
-    event.fire();
-}
-
-//------------------------------------------------------------------------------
-
-inline bool BlockingStream::isInterrupted()
-{
-    return interrupted;
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_BLOCKINGSTREAM_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/Buffer.h
===================================================================
--- src/hu/varadiistvan/scpl/io/Buffer.h	(revision 6)
+++ 	(revision )
@@ -1,241 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_BUFFER_H
-#define HU_VARADIISTVAN_SCPL_IO_BUFFER_H
-//------------------------------------------------------------------------------
-
-#include <algorithm>
-
-#include <cstdlib>
-#include <cstring>
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * Base class for buffers. It maintains a memory area of a certain
- * capacity and the length of the data in the buffer.
- */
-class Buffer
-{
-private:
-    /**
-     * The data itself.
-     */
-    unsigned char* data;
-
-    /**
-     * The capacity of the buffer.
-     */
-    size_t capacity;
-
-    /**
-     * The amount of data in the buffer.
-     */
-    size_t length;
-
-public:
-    /**
-     * Construct the buffer with the given capacity.
-     */
-    Buffer(size_t capacity);
-
-    /**
-     * Destroy the buffer.
-     */
-    ~Buffer();
-
-    /**
-     * Get the capacity of the buffer.
-     */
-    size_t getCapacity() const;
-
-    /**
-     * Get the pointer to the data.
-     */
-    const unsigned char* getData() const;
-
-    /**
-     * Get the pointer to the data for modification.
-     */
-    unsigned char* getData();
-
-    /**
-     * Get the length of the data.
-     */
-    size_t getLength() const;
-
-    /**
-     * Get whether the buffer is empty or not.
-     */
-    bool isEmpty() const;
-
-    /**
-     * Get the available capacity in the buffer.
-     */
-    size_t getAvailable() const;
-
-    /**
-     * Reset the buffer.
-     */
-    void reset();
-
-    /**
-     * Add the given amount to the length. Should not exceed the
-     * capacity!
-     *
-     * @return the actual amount added.
-     */
-    size_t addLength(size_t n);
-
-    /**
-     * Append the given data to the contents of the given buffer.
-     *
-     * @return the number of bytes actually appended
-     */
-    size_t append(const void* src, size_t size);
-
-    /**
-     * Extract data into the given buffer from the given offset.
-     *
-     * @return the number of bytes actually extracted.
-     */
-    size_t extract(void* dest, size_t size, size_t offset = 0) const;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline Buffer::Buffer(size_t capacity) :
-    data(new unsigned char[capacity]),
-    capacity(capacity),
-    length(0)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline Buffer::~Buffer()
-{
-    delete[] data;
-}
-
-//------------------------------------------------------------------------------
-
-inline size_t Buffer::getCapacity() const
-{
-    return capacity;
-}
-
-//------------------------------------------------------------------------------
-
-inline const unsigned char* Buffer::getData() const
-{
-    return data;
-}
-
-//------------------------------------------------------------------------------
-
-inline unsigned char* Buffer::getData()
-{
-    return data;
-}
-
-//------------------------------------------------------------------------------
-
-inline size_t Buffer::getLength() const
-{
-    return length;
-}
-
-//------------------------------------------------------------------------------
-
-inline bool Buffer::isEmpty() const
-{
-    return length==0;
-}
-
-//------------------------------------------------------------------------------
-
-inline size_t Buffer::getAvailable() const
-{
-    return capacity - length;
-}
-
-//------------------------------------------------------------------------------
-
-inline void Buffer::reset()
-{
-    length = 0;
-}
-
-//------------------------------------------------------------------------------
-
-inline size_t Buffer::addLength(size_t n)
-{
-    size_t toAdd = std::min(n, getAvailable());
-    length += toAdd;
-    return toAdd;
-}
-
-//------------------------------------------------------------------------------
-
-inline size_t Buffer::append(const void* src, size_t size)
-{
-    size_t toCopy = std::min(size, getAvailable());
-    memcpy(data + length, src, toCopy);
-    length += toCopy;
-    return toCopy;
-}
-
-//------------------------------------------------------------------------------
-
-inline size_t Buffer::extract(void* dest, size_t size, size_t offset) const
-{
-    size_t toCopy = (offset>=length) ? 0 : std::min(size, length - offset);
-    memcpy(dest, data + offset, toCopy);
-    return toCopy;
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_BUFFER_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/BufferedStream.h
===================================================================
--- src/hu/varadiistvan/scpl/io/BufferedStream.h	(revision 8)
+++ 	(revision )
@@ -1,111 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_BUFFEREDSTREAM_H
-#define HU_VARADIISTVAN_SCPL_IO_BUFFEREDSTREAM_H
-//------------------------------------------------------------------------------
-
-#if 0 // The public interface of BufferedStream
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * Base class for streams on which a waiter can wait and provides a
- * reading and/or a writing buffer.
- */
-class BufferedStream : public Failable
-{
-public:
-    /**
-     * The default buffer capacity.
-     */
-    static const size_t DEFAULT_CAPACITY = 4096;
-
-public:
-    /**
-     * Destroy the buffered stream.
-     */
-    virtual ~BufferedStream();
-
-    /**
-     * Get the reference of the reading buffer. Note, that it can be a
-     * 0 reference, if the stream has no reading buffer.
-     */
-    ReadingBuffer& getReadingBuffer();
-
-    /**
-     * Get the reference of the writing buffer. Note, that it can be a
-     * 0 reference, if the stream has no writing buffer.
-     */
-    WritingBuffer& getWritingBuffer();
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-#endif // 0, The public interface of BufferedStream
-
-//------------------------------------------------------------------------------
-
-#include "hu/varadiistvan/scpl/config.h"
-
-//------------------------------------------------------------------------------
-
-#if TARGET_API_POSIX
-
-#include "_posix/BufferedStream.h"
-
-//------------------------------------------------------------------------------
-
-#elif TARGET_API_WIN32 || TARGET_API_WIN64
-
-#include "_win32/BufferedStream.h"
-
-//------------------------------------------------------------------------------
-
-#else
-
-#error "Not implemented for this target!"
-
-#endif
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_BUFFEREDSTREAM_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/BufferedStreamAcceptor.h
===================================================================
--- src/hu/varadiistvan/scpl/io/BufferedStreamAcceptor.h	(revision 27)
+++ 	(revision )
@@ -1,65 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#pragma once
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-class BufferedStream;
-class Waiter;
-
-//------------------------------------------------------------------------------
-
-/**
- * Interface for acceptors that accept a buffered stream
- */
-class BufferedStreamAcceptor
-{
-public:
-    /**
-     * Get the last accepted entity as a buffered stream with the given waiter,
-     * if any.
-     */
-    virtual BufferedStream* getAcceptedBufferedStream(Waiter* waiter = nullptr) = 0;
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/DataStream.cc
===================================================================
--- src/hu/varadiistvan/scpl/io/DataStream.cc	(revision 22)
+++ 	(revision )
@@ -1,120 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "DataStream.h"
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::DataStream;
-
-using std::string;
-using std::min;
-
-//------------------------------------------------------------------------------
-
-size_t DataStream::readLength()
-{
-    size_t length = 0;
-
-    uint8_t d = 0;
-    unsigned shift = 0;
-    do {
-        d = readU8();
-        length |= static_cast<size_t>(d&0x7f)<<shift;
-        shift += 7;
-    } while( (d&0x80)==0x80 );
-
-    return length;
-}
-
-//------------------------------------------------------------------------------
-
-string DataStream::readString()
-{
-    size_t length = readLength();
-    if (!*this) return "";
-
-    char* buffer = new char[length];
-    if (read(buffer, length)) {
-        string str(buffer, length);
-        delete buffer;
-        return str;
-    } else {
-        delete buffer;
-        return "";
-    }
-}
-
-//------------------------------------------------------------------------------
-
-size_t DataStream::readString(char* dest, size_t capacity)
-{
-    size_t length = readLength();
-    size_t destLength = 0;
-    if (*this && length>0) {
-        size_t destLength = min(length, capacity - 1);
-        if (read(dest, destLength)) {
-            if (destLength<length) {
-                if (!skip(length - destLength)) {
-                    length = destLength = 0;
-                }
-            }
-        } else {
-            length = destLength = 0;
-        }
-    } else {
-        length = 0;
-    }
-
-    dest[destLength] = '\0';
-
-    return length;
-}
-
-//------------------------------------------------------------------------------
-
-bool DataStream::writeLength(size_t length)
-{
-    do {
-        uint8_t x = length&0x7f;
-        length >>= 7;
-        if (length>0) x |= 0x80;
-        if (!writeU8(x)) return false;
-    } while(length>0);
-    return true;
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/DataStream.h
===================================================================
--- src/hu/varadiistvan/scpl/io/DataStream.h	(revision 10)
+++ 	(revision )
@@ -1,444 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_DATASTREAM_H
-#define HU_VARADIISTVAN_SCPL_IO_DATASTREAM_H
-//------------------------------------------------------------------------------
-
-#include "BlockingStream.h"
-
-#include <string>
-
-#include <cstring>
-
-#include <inttypes.h>
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * A blocking stream with extra functions to read and write values of
- * basic data types. The values are read and written in host
- * byte-order, so this stream does not work properly between machines
- * of different endianness.
- *
- * The reading functions return the value read and you can check of
- * error or interruption only by calling the appropriate
- * functions. The purpose of this behaviour is that the data could be
- * read item-by-item without having to check for the stream's
- * health all the time. Such checks are needed only, if some decision
- * is made, based on the data. In case of an error, the read functions
- * return some well-define default value, typically 0.
- *
- * The writing functions return a boolean value indicating success or
- * failure, but writing can be handled the same way as reading from
- * the point of view of error checking.
- */
-class DataStream : public BlockingStream
-{
-public:
-    /**
-     * Construct the stream.
-     */
-    DataStream(BufferedStream& stream);
-
-    /**
-     * Template for simple, type-specific reading.
-     */
-    template <typename T> T readT(T defaultValue = 0);
-
-    /**
-     * Read a signed, 8-bit value
-     */
-    int8_t readS8();
-
-    /**
-     * Read an unsigned, 8-bit value
-     */
-    uint8_t readU8();
-
-    /**
-     * Read a signed, 16-bit value
-     */
-    int16_t readS16();
-
-    /**
-     * Read an unsigned, 16-bit value
-     */
-    uint16_t readU16();
-
-    /**
-     * Read a signed, 32-bit value
-     */
-    int32_t readS32();
-
-    /**
-     * Read an unsigned, 32-bit value
-     */
-    uint32_t readU32();
-
-    /**
-     * Read a signed, 64-bit value
-     */
-    int64_t readS64();
-
-    /**
-     * Read an unsigned, 64-bit value
-     */
-    uint64_t readU64();
-
-    /**
-     * Read a float value.
-     */
-    float readFloat();
-
-    /**
-     * Read a double value.
-     */
-    double readDouble();
-
-    /**
-     * Read a long double value.
-     */
-    long double readLongDouble();
-
-    /**
-     * Read a length value. This is a of at most 32 bits, represented
-     * by a variable number of bytes for space efficiency.
-     *
-     * @see writeLength()
-     */
-    size_t readLength();
-
-    /**
-     * Read a string.
-     */
-    std::string readString();
-
-    /**
-     * Read a string into the given buffer. If the string is too large
-     * for the buffer, its end will be discarded. A trailing 0 is
-     * added in cases!
-     *
-     * @return the actual length of the string.
-     */
-    size_t readString(char* dest, size_t capacity);
-
-    /**
-     * Write a signed, 8-bit value
-     */
-    bool writeS8(int8_t x);
-
-    /**
-     * Write an unsigned, 8-bit value
-     */
-    bool writeU8(uint8_t x);
-
-    /**
-     * Write a signed, 16-bit value
-     */
-    bool writeS16(int16_t x);
-
-    /**
-     * Write an unsigned, 16-bit value
-     */
-    bool writeU16(uint16_t x);
-
-    /**
-     * Write a signed, 32-bit value
-     */
-    bool writeS32(int32_t x);
-
-    /**
-     * Write an unsigned, 32-bit value
-     */
-    bool writeU32(uint32_t x);
-
-    /**
-     * Write a signed, 64-bit value
-     */
-    bool writeS64(int64_t x);
-
-    /**
-     * Write an unsigned, 64-bit value
-     */
-    bool writeU64(uint64_t x);
-
-    /**
-     * Write a float value.
-     */
-    bool writeFloat(float x);
-
-    /**
-     * Write a double value.
-     */
-    bool writeDouble(double x);
-
-    /**
-     * Write a long double value.
-     */
-    bool writeLongDouble(long double x);
-
-    /**
-     * Write a length value. This a 32-bit value written as a sequence
-     * of bytes of variable length. A bytes's lower 7 bits contain
-     * parts of the value. The MSB indicates if another byte is left.
-     */
-    bool writeLength(size_t length);
-
-    /**
-     * Write a string. First the string's length is written as a
-     * length (see writeLength()), then the characters of the string
-     * without the trailing 0.
-     */
-    bool writeString(const char* s, size_t length);
-
-    /**
-     * Write a string. First the string's length is written as a
-     * length (see writeLength()), then the characters of the string
-     * without the trailing 0.
-     */
-    bool writeString(const std::string& s);
-
-    /**
-     * Write a string. First the string's length is written as a
-     * length (see writeLength()), then the characters of the string
-     * without the trailing 0.
-     */
-    bool writeString(const char* s);
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline DataStream::DataStream(BufferedStream& stream) :
-    BlockingStream(stream)
-{
-}
-
-//------------------------------------------------------------------------------
-
-template <typename T> T DataStream::readT(T defaultValue)
-{
-    T value = defaultValue;
-    read(&value, sizeof(value));
-    return value;
-}
-
-//------------------------------------------------------------------------------
-
-inline int8_t DataStream::readS8()
-{
-    return readT<int8_t>(0);
-}
-
-//------------------------------------------------------------------------------
-
-inline uint8_t DataStream::readU8()
-{
-    return readT<uint8_t>(0);
-}
-
-//------------------------------------------------------------------------------
-
-inline int16_t DataStream::readS16()
-{
-    return readT<int16_t>(0);
-}
-
-//------------------------------------------------------------------------------
-
-inline uint16_t DataStream::readU16()
-{
-    return readT<uint16_t>(0);
-}
-
-//------------------------------------------------------------------------------
-
-inline int32_t DataStream::readS32()
-{
-    return readT<int32_t>(0);
-}
-
-//------------------------------------------------------------------------------
-
-inline uint32_t DataStream::readU32()
-{
-    return readT<uint32_t>(0);
-}
-
-//------------------------------------------------------------------------------
-
-inline int64_t DataStream::readS64()
-{
-    return readT<int64_t>(0);
-}
-
-//------------------------------------------------------------------------------
-
-inline uint64_t DataStream::readU64()
-{
-    return readT<uint64_t>(0);
-}
-
-//------------------------------------------------------------------------------
-
-inline float DataStream::readFloat()
-{
-    return readT<float>(0.0);
-}
-
-//------------------------------------------------------------------------------
-
-inline double DataStream::readDouble()
-{
-    return readT<double>(0.0);
-}
-
-//------------------------------------------------------------------------------
-
-inline long double DataStream::readLongDouble()
-{
-    return readT<long double>(0.0);
-}
-
-//------------------------------------------------------------------------------
-
-inline bool DataStream::writeS8(int8_t x)
-{
-    return write(&x, sizeof(x));
-}
-
-//------------------------------------------------------------------------------
-
-inline bool DataStream::writeU8(uint8_t x)
-{
-    return write(&x, sizeof(x));
-}
-
-//------------------------------------------------------------------------------
-
-inline bool DataStream::writeS16(int16_t x)
-{
-    return write(&x, sizeof(x));
-}
-
-//------------------------------------------------------------------------------
-
-inline bool DataStream::writeU16(uint16_t x)
-{
-    return write(&x, sizeof(x));
-}
-
-//------------------------------------------------------------------------------
-
-inline bool DataStream::writeS32(int32_t x)
-{
-    return write(&x, sizeof(x));
-}
-
-//------------------------------------------------------------------------------
-
-inline bool DataStream::writeU32(uint32_t x)
-{
-    return write(&x, sizeof(x));
-}
-
-//------------------------------------------------------------------------------
-
-inline bool DataStream::writeS64(int64_t x)
-{
-    return write(&x, sizeof(x));
-}
-
-//------------------------------------------------------------------------------
-
-inline bool DataStream::writeU64(uint64_t x)
-{
-    return write(&x, sizeof(x));
-}
-
-//------------------------------------------------------------------------------
-
-inline bool DataStream::writeFloat(float x)
-{
-    return write(&x, sizeof(x));
-}
-
-//------------------------------------------------------------------------------
-
-inline bool DataStream::writeDouble(double x)
-{
-    return write(&x, sizeof(x));
-}
-
-//------------------------------------------------------------------------------
-
-inline bool DataStream::writeLongDouble(long double x)
-{
-    return write(&x, sizeof(x));
-}
-
-//------------------------------------------------------------------------------
-
-inline bool DataStream::writeString(const char* s, size_t length)
-{
-    if (!writeLength(length)) return false;
-    else return write(s, length);
-}
-
-//------------------------------------------------------------------------------
-
-inline bool DataStream::writeString(const std::string& s)
-{
-    return writeString(s.c_str(), s.length());
-}
-
-//------------------------------------------------------------------------------
-
-inline bool DataStream::writeString(const char* s)
-{
-    return writeString(s, strlen(s));
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_DATASTREAM_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/Failable.h
===================================================================
--- src/hu/varadiistvan/scpl/io/Failable.h	(revision 6)
+++ 	(revision )
@@ -1,184 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_FAILABLE_H
-#define HU_VARADIISTVAN_SCPL_IO_FAILABLE_H
-//------------------------------------------------------------------------------
-
-#include "../types.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * An object whose instances can fail, and the reason of the failure
- * is indicated by an integral error code.
- */
-class Failable
-{
-private:
-    /**
-     * The error code.
-     */
-    errorCode_t errorCode;
-
-public:
-    /**
-     * Construct the object and initialize the error code to indicate
-     * no error.
-     */
-    Failable();
-
-    /**
-     * Indicate if the object has failed.
-     */
-    bool failed() const;
-
-    /**
-     * Get the error code.
-     */
-    errorCode_t getErrorCode() const;
-
-    /**
-     * Discard the error code.
-     */
-    void repair();
-
-protected:
-    /**
-     * Set the error code.
-     */
-    void setErrorCode(errorCode_t ec);
-};
-
-//------------------------------------------------------------------------------
-
-/**
- * An object that references another failable object and fails
- * together with that object.
- *
- * The Child class should contain a function named getFailable()
- * which returns the failable object.
- */
-template <class Child>
-class FailableReference
-{
-public:
-    /**
-     * Indicate if the referenced object has failed.
-     */
-    bool failed() const;
-
-    /**
-     * Get the error code from the referenced object.
-     */
-    errorCode_t getErrorCode() const;
-
-    /**
-     * Discard the error code of the referenced object.
-     */
-    void repair();
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline Failable::Failable() :
-    errorCode(XPL_NO_ERROR)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline bool Failable::failed() const
-{
-    return errorCode!=XPL_NO_ERROR;
-}
-
-//------------------------------------------------------------------------------
-
-inline errorCode_t Failable::getErrorCode() const
-{
-    return errorCode;
-}
-
-//------------------------------------------------------------------------------
-
-inline void Failable::repair()
-{
-    errorCode = XPL_NO_ERROR;
-}
-
-//------------------------------------------------------------------------------
-
-inline void Failable::setErrorCode(errorCode_t ec)
-{
-    errorCode = ec;
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-template <class Child>
-inline bool FailableReference<Child>::failed() const
-{
-    return static_cast<const Child*>(this)->getFailable().failed();
-}
-
-//------------------------------------------------------------------------------
-
-template <class Child>
-inline errorCode_t FailableReference<Child>::getErrorCode() const
-{
-    return static_cast<const Child*>(this)->getFailable().getErrorCode();
-}
-
-//------------------------------------------------------------------------------
-
-template <class Child>
-inline void FailableReference<Child>::repair()
-{
-    static_cast<Child*>(this)->getFailable().repair();
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_FAILABLE_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/LocalAcceptor.h
===================================================================
--- src/hu/varadiistvan/scpl/io/LocalAcceptor.h	(revision 27)
+++ 	(revision )
@@ -1,127 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_LOCALACCEPTOR_H
-#define HU_VARADIISTVAN_SCPL_IO_LOCALACCEPTOR_H
-//------------------------------------------------------------------------------
-
-#if 0 // The public interface of LocalAcceptor
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * An acceptor that provides a LocalSocket for each accepted
- * connection.
- */
-class LocalAcceptor : public FailableReference<LocalAcceptor>,
-                      public BufferedStreamAcceptor
-{
-public:
-
-    /**
-     * Start accepting a connection.
-     *
-     * If a connection is already accepted, but not retrieved yet, it
-     * returns true.
-     *
-     * If a new socket becomes immediately available, it returns true.
-     *
-     * If some error occurs, the acceptor is marked as failed.
-     */
-    bool accept();
-
-    /**
-     * Get the local socket accepted last. If no socket was accepted,
-     * return 0. The local socket's waiter will be the given one. If
-     * the server socket has no waiter, this one should be 0. If the
-     * server socket has a waiter, this one should not be 0. In other
-     * words, if the server socket is non-blocking, the accepted one
-     * should also be non-blocking, if the server socket is blocking,
-     * the accepted one should also be blocking.
-     */
-    LocalSocket* getSocket(Waiter* waiter,
-                           size_t readingCapacity = LocalSocket::DEFAULT_CAPACITY,
-                           size_t writingCapacity = LocalSocket::DEFAULT_CAPACITY);
-    /**
-     * Get the local socket accepted last. If no socket was accepted,
-     * return 0. The local socket's waiter will be the same as that of
-     * the associated server socket.
-     */
-    LocalSocket* getSocket(size_t readingCapacity = LocalSocket::DEFAULT_CAPACITY,
-                           size_t writingCapacity = LocalSocket::DEFAULT_CAPACITY);
-
-    /**
-     * Get the last accepted socket with the given waiter, if any.
-     */
-    BufferedStream* getAcceptedBufferedStream(Waiter* waiter = nullptr) override;
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-#endif // 0, The public interface of LocalAcceptor
-
-//------------------------------------------------------------------------------
-
-#include "hu/varadiistvan/scpl/config.h"
-
-//------------------------------------------------------------------------------
-
-#if TARGET_API_POSIX
-
-#include "_posix/LocalAcceptor.h"
-
-//------------------------------------------------------------------------------
-
-#elif TARGET_API_WIN32 || TARGET_API_WIN64
-
-#include "_win32/LocalAcceptor.h"
-
-//------------------------------------------------------------------------------
-
-#else
-
-#error "Not implemented for this target!"
-
-#endif
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_LOCALACCEPTOR_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/LocalClientSocket.h
===================================================================
--- src/hu/varadiistvan/scpl/io/LocalClientSocket.h	(revision 16)
+++ 	(revision )
@@ -1,115 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_LOCALCLIENTSOCKET_H
-#define HU_VARADIISTVAN_SCPL_IO_LOCALCLIENTSOCKET_H
-//------------------------------------------------------------------------------
-
-#if 0 // The public interface of LocalClientSocket
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-class LocalConnector;
-
-//------------------------------------------------------------------------------
-
-/**
- * Client socket that connects to a server socket locally. On Linux it
- * is a Unix socket, on Windows it is a named pipe.
- *
- * The server socket's name should be given.
- */
-class LocalClientSocket : public BufferedStream
-{
-public:
-    /**
-     * Construct the client socket with the given name.
-     *
-     * @param name the name of the server socket
-     * @param waiter the waiter to use for waiting a possible event
-     * occuring on the socket. If given, the socket will be
-     * non-blocking. Otherwise, it will be blocking, and the connect()
-     * function of the Connector might block as well as the reading
-     * and writing buffers.
-     * @param readingCapacity the capacity of the reading buffer
-     * @param writingCapacity the capacity of the writing buffer
-     */
-    LocalClientSocket(const char* name, Waiter* waiter = 0,
-                      size_t readingCapacity = DEFAULT_CAPACITY,
-                      size_t writingCapacity = DEFAULT_CAPACITY);
-
-    /**
-     * Get the connector. Use this object to connect to another socket.
-     */
-    LocalConnector& getConnector();
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-#endif // 0, The public interface of LocalClientSocket
-
-//------------------------------------------------------------------------------
-
-#include "hu/varadiistvan/scpl/config.h"
-
-//------------------------------------------------------------------------------
-
-#if TARGET_API_POSIX
-
-#include "_posix/LocalClientSocket.h"
-
-//------------------------------------------------------------------------------
-
-#elif TARGET_API_WIN32 || TARGET_API_WIN64
-
-#include "_win32/LocalClientSocket.h"
-
-//------------------------------------------------------------------------------
-
-#else
-
-#error "Not implemented for this target!"
-
-#endif
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_LOCALCLIENTSOCKET_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/LocalConnector.h
===================================================================
--- src/hu/varadiistvan/scpl/io/LocalConnector.h	(revision 8)
+++ 	(revision )
@@ -1,103 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_LOCALCONNECTOR_H
-#define HU_VARADIISTVAN_SCPL_IO_LOCALCONNECTOR_H
-//------------------------------------------------------------------------------
-
-#if 0 // The public interface of LocalConnector
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * Class representing the creation of a connection to some remote
- * entity, like a socket or a pipe. It cannot be created directly,
- * only acquired from a client socket.
- */
-class LocalConnector : public FailableReference<LocalConnector>
-{
-public:
-    /**
-     * Connect to an address properly set up.
-     *
-     * If the connection succeeds immediately, it indicates success.
-     *
-     * If the connection does not succeed, because it would block, it
-     * sets up the socket to wait for the connection to succeed, and
-     * returns failure.
-     *
-     * If the connection fails for another reason, the error code is
-     * set, and false is returned.
-     */
-    bool connect();
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-#endif // 0, The public interface of LocalConnector
-
-//------------------------------------------------------------------------------
-
-#include "hu/varadiistvan/scpl/config.h"
-
-//------------------------------------------------------------------------------
-
-#if TARGET_API_POSIX
-
-#include "_posix/LocalConnector.h"
-
-//------------------------------------------------------------------------------
-
-#elif TARGET_API_WIN32 || TARGET_API_WIN64
-
-#include "_win32/LocalConnector.h"
-
-//------------------------------------------------------------------------------
-
-#else
-
-#error "Not implemented for this target!"
-
-#endif
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_LOCALCONNECTOR_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/LocalServerSocket.h
===================================================================
--- src/hu/varadiistvan/scpl/io/LocalServerSocket.h	(revision 16)
+++ 	(revision )
@@ -1,110 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_LOCALSERVERSOCKET_H
-#define HU_VARADIISTVAN_SCPL_IO_LOCALSERVERSOCKET_H
-//------------------------------------------------------------------------------
-
-#if 0 // The public interface of LocalServerSocket
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * A server socket that provides a local, named access point. On
- * Linux, it is a Unix socket, on Windows it is a named pipe.
- *
- * It is identified by a name that should be unique for the user.
- */
-class LocalServerSocket
-{
-public:
-    /**
-     * Construct the socket with the given name.
-     *
-     * It will be bound to the name and able to listen for incoming
-     * connections.
-     *
-     * @param name the name of the server socket that can be used by
-     * clients to connect to this socket
-     * @param waiter the waiter to use for waiting a possible event
-     * occuring on the socket. If given, the socket will be
-     * non-blocking. Otherwise, it will be blocking, and the accept()
-     * function of the Acceptor might block.
-     */
-    LocalServerSocket(const char* name, Waiter* waiter = 0);
-
-    /**
-     * Get the acceptor.
-     */
-    LocalAcceptor& getAcceptor();
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-#endif // 0, The public interface of LocalServerSocket
-
-//------------------------------------------------------------------------------
-
-#include "hu/varadiistvan/scpl/config.h"
-
-//------------------------------------------------------------------------------
-
-#if TARGET_API_POSIX
-
-#include "_posix/LocalServerSocket.h"
-
-//------------------------------------------------------------------------------
-
-#elif TARGET_API_WIN32 || TARGET_API_WIN64
-
-#include "_win32/LocalServerSocket.h"
-
-//------------------------------------------------------------------------------
-
-#else
-
-#error "Not implemented for this target!"
-
-#endif
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_LOCALSERVERSOCKET_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/LocalSocket.h
===================================================================
--- src/hu/varadiistvan/scpl/io/LocalSocket.h	(revision 8)
+++ 	(revision )
@@ -1,88 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_LOCALSOCKET_H
-#define HU_VARADIISTVAN_SCPL_IO_LOCALSOCKET_H
-//------------------------------------------------------------------------------
-
-#if 0 // The public interface of LocalSocket
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * A socket that works on a local connection. On Linux, it is a Unix
- * socket, on Windows it is a named pipe.
- */
-class LocalSocket : public BufferedStream
-{
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-#endif // 0, The public interface of LocalSocket
-
-//------------------------------------------------------------------------------
-
-#include "hu/varadiistvan/scpl/config.h"
-
-//------------------------------------------------------------------------------
-
-#if TARGET_API_POSIX
-
-#include "_posix/LocalSocket.h"
-
-//------------------------------------------------------------------------------
-
-#elif TARGET_API_WIN32 || TARGET_API_WIN64
-
-#include "_win32/LocalSocket.h"
-
-//------------------------------------------------------------------------------
-
-#else
-
-#error "Not implemented for this target!"
-
-#endif
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_LOCALSOCKET_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/Makefile.am
===================================================================
--- src/hu/varadiistvan/scpl/io/Makefile.am	(revision 34)
+++ 	(revision )
@@ -1,49 +1,0 @@
-SUBDIRS=
-
-AM_CPPFLAGS = -I$(top_builddir)/src
-
-if TARGET_API_POSIX
-SUBDIRS+=_posix
-endif
-
-if TARGET_API_WIN32
-SUBDIRS+=_win32
-AM_LDFLAGS=-no-undefined
-endif
-
-noinst_LTLIBRARIES=libvscpl_io.la
-
-libvscpl_io_la_SOURCES=\
-        BlockingStream.cc       \
-        DataStream.cc
-
-if TARGET_API_POSIX
-libvscpl_io_la_LIBADD=_posix/libvscpl_io_posix.la
-endif
-
-if TARGET_API_WIN32
-libvscpl_io_la_LIBADD=_win32/libvscpl_io_win32.la
-endif
-
-include_vscpliodir=$(includedir)/hu/varadiistvan/scpl/io
-include_vscplio_HEADERS=\
-        Buffer.h                \
-        Failable.h              \
-        Waiter.h                \
-        WaitableEvent.h         \
-        ReadingBuffer.h         \
-        WritingBuffer.h         \
-        BufferedStream.h        \
-        BufferedStreamAcceptor.h \
-        LocalConnector.h        \
-        LocalClientSocket.h     \
-        LocalSocket.h           \
-        LocalAcceptor.h         \
-        LocalServerSocket.h     \
-        TCPConnector.h          \
-        TCPClientSocket.h       \
-        TCPSocket.h             \
-        TCPAcceptor.h           \
-        TCPServerSocket.h       \
-        BlockingStream.h        \
-        DataStream.h
Index: c/hu/varadiistvan/scpl/io/ReadingBuffer.h
===================================================================
--- src/hu/varadiistvan/scpl/io/ReadingBuffer.h	(revision 6)
+++ 	(revision )
@@ -1,112 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_READINGBUFFER_H
-#define HU_VARADIISTVAN_SCPL_IO_READINGBUFFER_H
-//------------------------------------------------------------------------------
-
-#if 0 // The public interface of ReadingBuffer
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * A buffer used for reading from a buffered stream. It cannot be
- * created directly, only acquired from the stream.
- *
- * It should be made empty, and then the function read() should be
- * called on it. If it returns true, some data could be read. If the
- * amount of data read is 0, that indicates and end-of-file condition.
- */
-class ReadingBuffer : public Buffer, public FailableReference<ReadingBuffer>
-{
-public:
-    /**
-     * Read into the buffer using the buffered stream if possible.
-     *
-     * If the buffer contains data, this function returns immediately
-     * with success, so the buffer should be reset before reading.
-     *
-     * If some data can be read immediately, that is stored in the
-     * buffer, and success is indicated. Success is indicated even if
-     * the amount of data read is 0, allowing for signalling the
-     * end-of-file or end-of-connection condition.
-     *
-     * If the reading operation would block, the stream is set up so
-     * that it would read, and failure is returned.
-     *
-     * Otherwise, if the reading operation fails for some other
-     * reason, the buffer's error code is set, so it should always be
-     * checked on a failure!
-     */
-    bool read();
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-#endif // 0, The public interface of ReadingBuffer
-
-//------------------------------------------------------------------------------
-
-#include "hu/varadiistvan/scpl/config.h"
-
-//------------------------------------------------------------------------------
-
-#if TARGET_API_POSIX
-
-#include "_posix/ReadingBuffer.h"
-
-//------------------------------------------------------------------------------
-
-#elif TARGET_API_WIN32 || TARGET_API_WIN64
-
-#include "_win32/ReadingBuffer.h"
-
-//------------------------------------------------------------------------------
-
-#else
-
-#error "Not implemented for this target!"
-
-#endif
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_READINGBUFFER_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/TCPAcceptor.h
===================================================================
--- src/hu/varadiistvan/scpl/io/TCPAcceptor.h	(revision 34)
+++ 	(revision )
@@ -1,125 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#pragma once
-
-//------------------------------------------------------------------------------
-
-#if 0 // The public interface of TCPAcceptor
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * An acceptor that provides a TCPSocket for each accepted
- * connection.
- */
-class TCPAcceptor : public FailableReference<TCPAcceptor>,
-                    public BufferedStreamAcceptor
-{
-public:
-    /**
-     * Start accepting a connection.
-     *
-     * If a connection is already accepted, but not retrieved yet, it
-     * returns true.
-     *
-     * If a new socket becomes immediately available, it returns true.
-     *
-     * If some error occurs, the acceptor is marked as failed.
-     */
-    bool accept();
-
-    /**
-     * Get the TCP socket accepted last. If no socket was accepted,
-     * return 0. The TCP socket's waiter will be the given one. If
-     * the server socket has no waiter, this one should be 0. If the
-     * server socket has a waiter, this one should not be 0. In other
-     * words, if the server socket is non-blocking, the accepted one
-     * should also be non-blocking, if the server socket is blocking,
-     * the accepted one should also be blocking.
-     */
-    TCPSocket* getSocket(Waiter* waiter,
-                         size_t readingCapacity = LocalSocket::DEFAULT_CAPACITY,
-                         size_t writingCapacity = LocalSocket::DEFAULT_CAPACITY);
-    /**
-     * Get the TCP socket accepted last. If no socket was accepted,
-     * return 0. The TCP socket's waiter will be the same as that of
-     * the associated server socket.
-     */
-    TCPSocket* getSocket(size_t readingCapacity = LocalSocket::DEFAULT_CAPACITY,
-                         size_t writingCapacity = LocalSocket::DEFAULT_CAPACITY);
-
-    /**
-     * Get the last accepted socket with the given waiter, if any.
-     */
-    BufferedStream* getAcceptedBufferedStream(Waiter* waiter = nullptr) override;
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-#endif // 0, The public interface of LocalAcceptor
-
-//------------------------------------------------------------------------------
-
-#include "hu/varadiistvan/scpl/config.h"
-
-//------------------------------------------------------------------------------
-
-#if TARGET_API_POSIX
-
-#include "_posix/TCPAcceptor.h"
-
-//------------------------------------------------------------------------------
-
-#elif TARGET_API_WIN32 || TARGET_API_WIN64
-
-#include "_win32/TCPAcceptor.h"
-
-//------------------------------------------------------------------------------
-
-#else
-
-#error "Not implemented for this target!"
-
-#endif
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/TCPClientSocket.h
===================================================================
--- src/hu/varadiistvan/scpl/io/TCPClientSocket.h	(revision 42)
+++ 	(revision )
@@ -1,133 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#pragma once
-
-//------------------------------------------------------------------------------
-
-#if 0 // The public interface of TCPClientSocket
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-class TCPConnector;
-
-//------------------------------------------------------------------------------
-
-/**
- * Client socket that connects to a server socket over TCP.
- *
- * The server socket's IP address and port should be given.
- */
-class TCPClientSocket : public BufferedStream
-{
-public:
-    /**
-     * Construct the client socket with the given address and port number.
-     *
-     * @param address the address of the server socket
-     * @param port the address of the server socket
-     * @param waiter the waiter to use for waiting a possible event
-     * occuring on the socket. If given, the socket will be
-     * non-blocking. Otherwise, it will be blocking, and the connect()
-     * function of the Connector might block as well as the reading
-     * and writing buffers.
-     * @param readingCapacity the capacity of the reading buffer
-     * @param writingCapacity the capacity of the writing buffer
-     */
-    TCPClientSocket(struct in_addr address, unsigned short port,
-                    Waiter* waiter = 0,
-                    size_t readingCapacity = DEFAULT_CAPACITY,
-                    size_t writingCapacity = DEFAULT_CAPACITY);
-
-    /**
-     * Construct the client socket with the given address and port number.
-     *
-     * @param address the address of the server socket expressed as a string
-     * @param port the address of the server socket
-     * @param waiter the waiter to use for waiting a possible event
-     * occuring on the socket. If given, the socket will be
-     * non-blocking. Otherwise, it will be blocking, and the connect()
-     * function of the Connector might block as well as the reading
-     * and writing buffers.
-     * @param readingCapacity the capacity of the reading buffer
-     * @param writingCapacity the capacity of the writing buffer
-     */
-    TCPClientSocket(const char* address, unsigned short port,
-                    Waiter* waiter = 0,
-                    size_t readingCapacity = DEFAULT_CAPACITY,
-                    size_t writingCapacity = DEFAULT_CAPACITY);
-
-    /**
-     * Get the connector. Use this object to connect to another socket.
-     */
-    TCPConnector& getConnector();
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-#endif // 0, The public interface of LocalClientSocket
-
-//------------------------------------------------------------------------------
-
-#include "hu/varadiistvan/scpl/config.h"
-
-//------------------------------------------------------------------------------
-
-#if TARGET_API_POSIX
-
-#include "_posix/TCPClientSocket.h"
-
-//------------------------------------------------------------------------------
-
-#elif TARGET_API_WIN32 || TARGET_API_WIN64
-
-#include "_win32/TCPClientSocket.h"
-
-//------------------------------------------------------------------------------
-
-#else
-
-#error "Not implemented for this target!"
-
-#endif
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/TCPConnector.h
===================================================================
--- src/hu/varadiistvan/scpl/io/TCPConnector.h	(revision 34)
+++ 	(revision )
@@ -1,101 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#pragma once
-
-//------------------------------------------------------------------------------
-
-#if 0 // The public interface of LocalConnector
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * Class representing the creation of a connection to a remote TCP socket.
- * It cannot be created directly, only acquired from a TCP client socket.
- */
-class TCPConnector : public FailableReference<TCPConnector>
-{
-public:
-    /**
-     * Connect to an address properly set up.
-     *
-     * If the connection succeeds immediately, it indicates success.
-     *
-     * If the connection does not succeed, because it would block, it
-     * sets up the socket to wait for the connection to succeed, and
-     * returns failure.
-     *
-     * If the connection fails for another reason, the error code is
-     * set, and false is returned.
-     */
-    bool connect();
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-#endif // 0, The public interface of TCPConnector
-
-//------------------------------------------------------------------------------
-
-#include "hu/varadiistvan/scpl/config.h"
-
-//------------------------------------------------------------------------------
-
-#if TARGET_API_POSIX
-
-#include "_posix/TCPConnector.h"
-
-//------------------------------------------------------------------------------
-
-#elif TARGET_API_WIN32 || TARGET_API_WIN64
-
-#include "_win32/TCPConnector.h"
-
-//------------------------------------------------------------------------------
-
-#else
-
-#error "Not implemented for this target!"
-
-#endif
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/TCPServerSocket.h
===================================================================
--- src/hu/varadiistvan/scpl/io/TCPServerSocket.h	(revision 34)
+++ 	(revision )
@@ -1,102 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#pragma once
-
-//------------------------------------------------------------------------------
-
-#if 0 // The public interface of TCPServerSocket
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * A server socket that provides a TCP access point.
- */
-class TCPServerSocket
-{
-public:
-    /**
-     * Construct the server socket to listen at the given port.
-     *
-     * @param port the number of the port to listen at
-     * @param waiter the waiter to use for waiting a possible event
-     * occuring on the socket. If given, the socket will be
-     * non-blocking. Otherwise, it will be blocking, and the accept()
-     * function of the Acceptor might block.
-     */
-    TCPServerSocket(unsigned short port, Waiter* waiter = nullptr);
-
-    /**
-     * Get the acceptor
-     */
-    TCPAcceptor& getAcceptor();
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-#endif // 0, The public interface of TCPServerSocket
-
-//------------------------------------------------------------------------------
-
-#include "hu/varadiistvan/scpl/config.h"
-
-//------------------------------------------------------------------------------
-
-#if TARGET_API_POSIX
-
-#include "_posix/TCPServerSocket.h"
-
-//------------------------------------------------------------------------------
-
-#elif TARGET_API_WIN32 || TARGET_API_WIN64
-
-#include "_win32/TCPServerSocket.h"
-
-//------------------------------------------------------------------------------
-
-#else
-
-#error "Not implemented for this target!"
-
-#endif
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/TCPSocket.h
===================================================================
--- src/hu/varadiistvan/scpl/io/TCPSocket.h	(revision 34)
+++ 	(revision )
@@ -1,86 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#pragma once
-
-//------------------------------------------------------------------------------
-
-#if 0 // The public interface of TCPSocket
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * A socket that works on a TCP connection.
- */
-class TCPSocket : public BufferedStream
-{
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-#endif // 0, The public interface of TCPSocket
-
-//------------------------------------------------------------------------------
-
-#include "hu/varadiistvan/scpl/config.h"
-
-//------------------------------------------------------------------------------
-
-#if TARGET_API_POSIX
-
-#include "_posix/TCPSocket.h"
-
-//------------------------------------------------------------------------------
-
-#elif TARGET_API_WIN32 || TARGET_API_WIN64
-
-#include "_win32/TCPSocket.h"
-
-//------------------------------------------------------------------------------
-
-#else
-
-#error "Not implemented for this target!"
-
-#endif
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/WaitableEvent.h
===================================================================
--- src/hu/varadiistvan/scpl/io/WaitableEvent.h	(revision 7)
+++ 	(revision )
@@ -1,113 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_WAITABLEEVENT_H
-#define HU_VARADIISTVAN_SCPL_IO_WAITABLEEVENT_H
-//------------------------------------------------------------------------------
-
-#if 0 // The public interface of WaitableEvent
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * An event on which one can wait with a waiter.
- */
-class WaitableEvent : public Failable
-{
-public:
-    /**
-     * Construct the event.
-     *
-     * @param waiter the waiter to be used for waiting. If given, the
-     * check() function will always return immediately. If not given,
-     * the check() function may block and returns only when the event
-     * is fired.
-     */
-    WaitableEvent(Waiter* waiter = 0);
-
-    /**
-     * Destroy the event.
-     */
-    virtual ~WaitableEvent();
-
-    /**
-     * Fire the event.
-     */
-    void fire();
-
-    /**
-     * Check if the event is fired or not. If so, the fired status
-     * will be cleared.
-     */
-    bool check();
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-#endif // 0, The public interface of WaitableEvent
-
-//------------------------------------------------------------------------------
-
-#include "hu/varadiistvan/scpl/config.h"
-
-//------------------------------------------------------------------------------
-
-#if TARGET_API_POSIX
-
-#include "_posix/WaitableEvent.h"
-
-//------------------------------------------------------------------------------
-
-#elif TARGET_API_WIN32 || TARGET_API_WIN64
-
-#include "_win32/WaitableEvent.h"
-
-//------------------------------------------------------------------------------
-
-#else
-
-#error "Not implemented for this target!"
-
-#endif
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_WAITABLEEVENT_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/Waiter.h
===================================================================
--- src/hu/varadiistvan/scpl/io/Waiter.h	(revision 6)
+++ 	(revision )
@@ -1,100 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_WAITER_H
-#define HU_VARADIISTVAN_SCPL_IO_WAITER_H
-//------------------------------------------------------------------------------
-
-#if 0 // The public interface of Waiter
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * Class that can be used to register waitable objects and then wait
- * for them. The objects are registered when they created and a Waiter
- * instance is passed to them.
- */
-class Waiter : public Failable
-{
-public:
-    /**
-     * Wait for any if the waitables to become ready or until a
-     * timeout expires.
-     *
-     * If any of the waitables are ready, the function returns immediately.
-     *
-     * @return true if any of the waitables has become ready, false if
-     * the timeout occurs.
-     */
-    bool wait(int timeout = -1);
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-#endif // 0, The public interface of Waiter
-
-//------------------------------------------------------------------------------
-
-#include "hu/varadiistvan/scpl/config.h"
-
-//------------------------------------------------------------------------------
-
-#if TARGET_API_POSIX
-
-#include "_posix/Waiter.h"
-
-//------------------------------------------------------------------------------
-
-#elif TARGET_API_WIN32 || TARGET_API_WIN64
-
-#include "_win32/Waiter.h"
-
-//------------------------------------------------------------------------------
-
-#else
-
-#error "Not implemented for this target!"
-
-#endif
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_WAITER_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/WritingBuffer.h
===================================================================
--- src/hu/varadiistvan/scpl/io/WritingBuffer.h	(revision 6)
+++ 	(revision )
@@ -1,118 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_WRITINGBUFFER_H
-#define HU_VARADIISTVAN_SCPL_IO_WRITINGBUFFER_H
-//------------------------------------------------------------------------------
-
-#if 0 // The public interface of WritingBuffer
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * A buffer used for writing into a buffered stream.  It cannot be
- * created directly, only acquired from the stream.
- *
- * The data to write should be stored in the buffer. Then write()
- * should be called. If it returns true, it indicates that all data
- * has been written. In that case the buffer is automatically emptied.
- */
-class WritingBuffer : public Buffer, public FailableReference<WritingBuffer>
-{
-public:
-    /**
-     * Reset the buffer. It resets the offset too.
-     */
-    void reset();
-
-    /**
-     * Write the contents of the buffer using the associated buffered
-     * stream.
-     *
-     * If the buffer is empty, the function returns indicating
-     * success.
-     *
-     * If the complete remaining contents could be written, it also indicates
-     * success, and the buffer is reset, ready to be used again.
-     *
-     * If not everything can be written and the write operation
-     * indicates that it would block, this function returns failure
-     * after the stream has been set up  to handle the corresponding
-     * poll events.
-     *
-     * Otherwise, if the writing operation fails for some other
-     * reason, the buffer's error code is set to the error's code and
-     * false is returned.
-     */
-    bool write();
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-#endif // 0, The public interface of WritingBuffer
-
-//------------------------------------------------------------------------------
-
-#include "hu/varadiistvan/scpl/config.h"
-
-//------------------------------------------------------------------------------
-
-#if TARGET_API_POSIX
-
-#include "_posix/WritingBuffer.h"
-
-//------------------------------------------------------------------------------
-
-#elif TARGET_API_WIN32 || TARGET_API_WIN64
-
-#include "_win32/WritingBuffer.h"
-
-//------------------------------------------------------------------------------
-
-#else
-
-#error "Not implemented for this target!"
-
-#endif
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_WRITINGBUFFER_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/.copyright
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/.copyright	(revision 6)
+++ 	(revision )
@@ -1,23 +1,0 @@
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
Index: c/hu/varadiistvan/scpl/io/_posix/.guardns
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/.guardns	(revision 6)
+++ 	(revision )
@@ -1,1 +1,0 @@
-posix
Index: c/hu/varadiistvan/scpl/io/_posix/.namespace
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/.namespace	(revision 6)
+++ 	(revision )
@@ -1,4 +1,0 @@
-hu
-varadiistvan
-scpl
-io
Index: c/hu/varadiistvan/scpl/io/_posix/.srcmessage
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/.srcmessage	(revision 6)
+++ 	(revision )
@@ -1,1 +1,0 @@
-// This file is part of VSCPL, a simple cross-platform utility library
Index: c/hu/varadiistvan/scpl/io/_posix/Acceptor.cc
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/Acceptor.cc	(revision 8)
+++ 	(revision )
@@ -1,79 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "Acceptor.h"
-
-#include "ServerSocket.h"
-
-#include <poll.h>
-#include <sys/socket.h>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::Acceptor;
-
-//------------------------------------------------------------------------------
-
-Acceptor::~Acceptor()
-{
-    delete [] address;
-}
-
-//------------------------------------------------------------------------------
-
-bool Acceptor::accept()
-{
-    if (failed()) return false;
-    if (acceptedFD>=0) return true;
-
-    size_t addrlen = addressLength;
-    int result = socket.accept(reinterpret_cast<struct ::sockaddr*>(address),
-                               (address==0) ? 0 : &addrlen);
-    if (result<0) {
-        if (socket.failed()) {
-            socket.events &= ~POLLIN;
-        } else {
-            socket.events |= POLLIN;
-        }
-        return false;
-    } else {
-        acceptedFD = result;
-        socket.events &= ~POLLIN;
-        return true;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/Acceptor.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/Acceptor.h	(revision 31)
+++ 	(revision )
@@ -1,166 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_POSIX_ACCEPTOR_H
-#define HU_VARADIISTVAN_SCPL_IO_POSIX_ACCEPTOR_H
-//------------------------------------------------------------------------------
-
-#include "../Failable.h"
-#include "../BufferedStreamAcceptor.h"
-
-#include "ServerSocket.h"
-
-#include <cstdlib>
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * Class representing the accepting of an incoming connection on a
- * socket.
- */
-class Acceptor : public FailableReference<Acceptor>,
-                 public BufferedStreamAcceptor
-{
-protected:
-    /**
-     * The socket we belong to.
-     */
-    ServerSocket& socket;
-
-    /**
-     * The file descriptor accepted the last time.
-     */
-    int acceptedFD;
-
-    /**
-     * The buffer for the remote address, if we are interested.
-     */
-    unsigned char* address;
-
-    /**
-     * The length of the remote address buffer.
-     */
-    size_t addressLength;
-
-protected:
-    /**
-     * Construct the acceptor.
-     *
-     * @param addressLength the length of the buffer for the peer
-     * address. If 0, not buffer will be created.
-     */
-    Acceptor(ServerSocket* socket, size_t addressLength = 0);
-
-public:
-    /**
-     * Destroy the acceptor.
-     */
-    virtual ~Acceptor();
-
-    /**
-     * Start accepting a connection.
-     *
-     * If a connection is already accepted, but not retrieved yet, it
-     * returns true.
-     *
-     * If a new socket becomes immediately available, it returns true.
-     *
-     * If some error occurs, the acceptor is marked as failed.
-     */
-    bool accept();
-
-protected:
-    /**
-     * Called when a connection gets processed and we can become ready
-     * for the next one.
-     */
-    void connectionProcessed();
-
-private:
-    /**
-     * Get the failable object.
-     */
-    const Failable& getFailable() const;
-
-    /**
-     * Get the failable object.
-     */
-    Failable& getFailable();
-
-    friend class FailableReference<Acceptor>;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline Acceptor::Acceptor(ServerSocket* socket, size_t addressLength) :
-    socket(*socket),
-    acceptedFD(-1),
-    address( (addressLength==0) ? 0 : new unsigned char[addressLength]),
-    addressLength(addressLength)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline void Acceptor::connectionProcessed()
-{
-    acceptedFD = -1;
-}
-
-//------------------------------------------------------------------------------
-
-inline const Failable& Acceptor::getFailable() const
-{
-    return socket;
-}
-
-//------------------------------------------------------------------------------
-
-inline Failable& Acceptor::getFailable()
-{
-    return socket;
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_POSIX_ACCEPTOR_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/BufferedStream.cc
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/BufferedStream.cc	(revision 6)
+++ 	(revision )
@@ -1,112 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "BufferedStream.h"
-
-#include "ReadingBuffer.h"
-#include "WritingBuffer.h"
-
-#include <unistd.h>
-#include <poll.h>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::BufferedStream;
-
-//------------------------------------------------------------------------------
-
-BufferedStream::BufferedStream(Waiter* waiter, int fd,
-                                   size_t readingCapacity,
-                                   size_t writingCapacity,
-                                   short events) :
-    Waitable(waiter, fd, events),
-    readingBuffer( (readingCapacity==0) ? 0 :
-                   new ReadingBuffer(readingCapacity, this)),
-    writingBuffer( (writingCapacity==0) ? 0 :
-                   new WritingBuffer(writingCapacity, this))
-{
-}
-
-//------------------------------------------------------------------------------
-
-BufferedStream::~BufferedStream()
-{
-    delete writingBuffer;
-    delete readingBuffer;
-}
-
-//------------------------------------------------------------------------------
-
-ssize_t BufferedStream::read(void* dest, size_t length)
-{
-    ssize_t result = ::read(fd, dest, length);
-    if (result<0 && errno!=EAGAIN && errno!=EWOULDBLOCK) {
-        setErrorCodeFromErrno();
-    }
-    return result;
-}
-
-//------------------------------------------------------------------------------
-
-ssize_t BufferedStream::write(const void* src, size_t length)
-{
-    ssize_t result = ::write(fd, src, length);
-    if (result<0 && errno!=EAGAIN && errno!=EWOULDBLOCK) {
-        setErrorCodeFromErrno();
-    }
-    return result;
-}
-
-//------------------------------------------------------------------------------
-
-bool BufferedStream::isReady()
-{
-    return false;
-}
-
-//------------------------------------------------------------------------------
-
-void BufferedStream::handleEvents(short ev)
-{
-    if ((ev&POLLIN)==POLLIN && readingBuffer!=0) {
-        readingBuffer->read();
-    }
-    if ((ev&POLLOUT)==POLLOUT && writingBuffer!=0) {
-        writingBuffer->write();
-    }
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/BufferedStream.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/BufferedStream.h	(revision 6)
+++ 	(revision )
@@ -1,169 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_POSIX_BUFFEREDSTREAM_H
-#define HU_VARADIISTVAN_SCPL_IO_POSIX_BUFFEREDSTREAM_H
-//------------------------------------------------------------------------------
-
-#include "Waitable.h"
-
-#include <cstdlib>
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-class ReadingBuffer;
-class WritingBuffer;
-
-//------------------------------------------------------------------------------
-
-/**
- * A waitable that has a read and/or a write buffer associated with
- * it.
- */
-class BufferedStream : public Waitable
-{
-public:
-    /**
-     * The default buffer capacity.
-     */
-    static const size_t DEFAULT_CAPACITY = 4096;
-
-private:
-    /**
-     * The reading buffer. It may be 0, if no reading buffer is
-     * associated with this waitable.
-     */
-    ReadingBuffer* readingBuffer;
-
-    /**
-     * The writing buffer. It may be 0, if no writing buffer is
-     * associated with this waitable.
-     */
-    WritingBuffer* writingBuffer;
-
-protected:
-    /**
-     * Construct the buffered waitable with the given capacities of
-     * the reading and writing buffers. If any of the capacities is 0,
-     * the corresponding buffer will not be created.
-     */
-    BufferedStream(Waiter* waiter = 0, int fd = -1,
-                     size_t readingCapacity = DEFAULT_CAPACITY,
-                     size_t writingCapacity = DEFAULT_CAPACITY,
-                     short events = 0);
-
-public:
-    /**
-     * Destroy the buffered waitable.
-     */
-    virtual ~BufferedStream();
-
-    /**
-     * Get the reference of the reading buffer. Note, that it can be a
-     * 0 reference, if the waitable has no reading buffer.
-     */
-    ReadingBuffer& getReadingBuffer();
-
-    /**
-     * Get the reference of the writing buffer. Note, that it can be a
-     * 0 reference, if the waitable has no writing buffer.
-     */
-    WritingBuffer& getWritingBuffer();
-
-protected:
-    /**
-     * Read using the file descriptor at most the given number of
-     * bytes into the given buffer.
-     *
-     * This default implementation uses the read(2) function for
-     * reading.
-     *
-     * @return the number of bytes read (0 in case of end-of-file or
-     * when the connection is closed), -1 on error. In case of error,
-     * the error code will be set up.
-     */
-    virtual ssize_t read(void* dest, size_t length);
-
-    /**
-     * Write using the file descriptor the given number of bytes from
-     * the given buffer.
-     *
-     * This default implementation uses the write(2) function for
-     * writing.
-     *
-     * @return the number of bytes written, or -1 on error. In case of error,
-     * the error code will be set up.
-     */
-    virtual ssize_t write(const void* src, size_t length);
-
-    /**
-     * Check if the waitable is ready.
-     */
-    virtual bool isReady();
-
-    /**
-     * Handle any events on the file descriptor.
-     */
-    virtual void handleEvents(short events);
-
-    friend class ReadingBuffer;
-    friend class WritingBuffer;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline ReadingBuffer& BufferedStream::getReadingBuffer()
-{
-    return *readingBuffer;
-}
-
-//------------------------------------------------------------------------------
-
-inline WritingBuffer& BufferedStream::getWritingBuffer()
-{
-    return *writingBuffer;
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_POSIX_BUFFEREDSTREAM_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/ClientSocket.cc
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/ClientSocket.cc	(revision 8)
+++ 	(revision )
@@ -1,72 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "ClientSocket.h"
-
-#include "Connector.h"
-
-#include <poll.h>
-
-#include <sys/socket.h>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::ClientSocket;
-
-//------------------------------------------------------------------------------
-
-void ClientSocket::handleEvents(short events)
-{
-    if (connector.connecting && (events&POLLOUT)==POLLOUT) {
-        connector.handleWritable();
-        events &= ~POLLOUT;
-    }
-
-    BufferedStream::handleEvents(events);
-}
-
-//------------------------------------------------------------------------------
-
-bool ClientSocket::connect(const struct sockaddr* addr, size_t addrlen)
-{
-    int result = ::connect(fd, addr, addrlen);
-    if (result<0 && errno!=EINPROGRESS) {
-        setErrorCodeFromErrno();
-    }
-    return result>=0;
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/ClientSocket.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/ClientSocket.h	(revision 8)
+++ 	(revision )
@@ -1,111 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_POSIX_CLIENTSOCKET_H
-#define HU_VARADIISTVAN_SCPL_IO_POSIX_CLIENTSOCKET_H
-//------------------------------------------------------------------------------
-
-#include "Socket.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-class Connector;
-
-//------------------------------------------------------------------------------
-
-/**
- * A socket that can be connected to another one.
- */
-class ClientSocket : public Socket
-{
-private:
-    /**
-     * The connector.
-     */
-    Connector& connector;
-
-protected:
-    /**
-     * Construct the socket with the given parameters.
-     */
-    ClientSocket(int domain, int type, Connector& connector,
-                 Waiter* waiter = 0, int protocol = 0,
-                 size_t readingCapacity = DEFAULT_CAPACITY,
-                 size_t writingCapacity = DEFAULT_CAPACITY);
-
-protected:
-    /**
-     * Handle any events on the file descriptor. If a connection is in
-     * progress, and the incoming events have the EPOLLOUT flag set,
-     * the connector is called to handle the event. Then the parent
-     * class' handleEvents function is called.
-     */
-    virtual void handleEvents(short events);
-
-    /**
-     * Connect the socket to the given address.
-     *
-     * @return whether the connection succeeded or not. If it does not
-     * succeeded, it may be either because of the socket being
-     * non-blocking and some time is needed, or because of a failure,
-     * in which case the error code will be set properly.
-     */
-    bool connect(const struct sockaddr* addr, size_t addrlen);
-
-    friend class Connector;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline ClientSocket::ClientSocket(int domain, int type, Connector& connector,
-                                  Waiter* waiter, int protocol,
-                                  size_t readingCapacity,
-                                  size_t writingCapacity) :
-    Socket(domain, type, waiter, protocol, readingCapacity, writingCapacity),
-    connector(connector)
-{
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_POSIX_CLIENTSOCKET_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/Connector.cc
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/Connector.cc	(revision 8)
+++ 	(revision )
@@ -1,92 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "Connector.h"
-
-#include "ClientSocket.h"
-
-#include <poll.h>
-#include <sys/socket.h>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::Connector;
-
-//------------------------------------------------------------------------------
-
-bool Connector::connect()
-{
-    if (connected) return true;
-    if (connecting || failed()) return false;
-
-    size_t addrlen = 0;
-    const struct sockaddr* addr = getAddress(addrlen);
-
-    if (socket.connect(addr, addrlen)) {
-        connected = true;
-        return true;
-    } else if (socket.failed()) {
-        return false;
-    } else {
-        connecting = true;
-        socket.events |= POLLOUT;
-        return false;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-void Connector::handleWritable()
-{
-    if (!connecting) return;
-
-    connecting = false;
-    socket.events &= ~POLLOUT;
-
-    int error = 0;
-    socklen_t len = sizeof(error);
-    if (getsockopt(socket.fd, SOL_SOCKET, SO_ERROR, &error, &len)<0) {
-        socket.setErrorCodeFromErrno();
-    } else {
-        if (error==0) {
-            connected = true;
-        } else {
-            socket.setErrorCode(error);
-        }
-    }
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/Connector.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/Connector.h	(revision 8)
+++ 	(revision )
@@ -1,162 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_POSIX_CONNECTOR_H
-#define HU_VARADIISTVAN_SCPL_IO_POSIX_CONNECTOR_H
-//------------------------------------------------------------------------------
-
-#include "../Failable.h"
-
-#include "ClientSocket.h"
-
-#include <cstdlib>
-
-//------------------------------------------------------------------------------
-
-struct sockaddr;
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * Class representing the creation of a connection to some remote
- * entity, like a socket or a pipe.
- */
-class Connector : public FailableReference<Connector>
-{
-private:
-    /**
-     * The socket on behalf of which the connection is being
-     * performed.
-     */
-    ClientSocket& socket;
-
-    /**
-     * Indicate that we are in the process of connecting.
-     */
-    bool connecting;
-
-    /**
-     * Indicate that we are connected.
-     */
-    bool connected;
-
-protected:
-    /**
-     * Construct the connector.
-     */
-    Connector(ClientSocket* socket);
-
-public:
-    /**
-     * Connect to an address properly set up.
-     *
-     * If the connection succeeds immediately, it indicates success.
-     *
-     * If the connection does not succeed, because it would block, it
-     * sets up the socket to wait for the connection to succeed, and
-     * returns failure.
-     *
-     * If the connection fails for another reason, the error code is
-     * set, and false is returned.
-     */
-    bool connect();
-
-protected:
-    /**
-     * Get the parameters for connecting.
-     */
-    virtual const struct sockaddr* getAddress(size_t& addrlen) = 0;
-
-    /**
-     * Handle the event that the socket is writable.
-     *
-     * If connection is in progress, this function returns
-     * immediately.
-     *
-     * Otherwise it reads the error code using getsockopt(), and if it
-     * indicates success, the connector is set to connected, otherwise
-     * it is set to failed.
-     */
-    void handleWritable();
-
-private:
-    /**
-     * Get the failable object.
-     */
-    const Failable& getFailable() const;
-
-    /**
-     * Get the failable object.
-     */
-    Failable& getFailable();
-
-    friend class FailableReference<Connector>;
-    friend class ClientSocket;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline Connector::Connector(ClientSocket* socket) :
-    socket(*socket),
-    connecting(false),
-    connected(false)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline const Failable& Connector::getFailable() const
-{
-    return socket;
-}
-
-//------------------------------------------------------------------------------
-
-inline Failable& Connector::getFailable()
-{
-    return socket;
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_POSIX_CONNECTOR_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/LocalAcceptor.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/LocalAcceptor.h	(revision 32)
+++ 	(revision )
@@ -1,65 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_POSIX_LOCALACCEPTOR_H
-#define HU_VARADIISTVAN_SCPL_IO_POSIX_LOCALACCEPTOR_H
-//------------------------------------------------------------------------------
-
-#include "SocketAcceptor.h"
-
-#include "LocalSocket.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * An acceptor that provides a LocalSocket for each accepted connection
- */
-class LocalAcceptor : public SocketAcceptor<LocalSocket>
-{
-private:
-    using SocketAcceptor<LocalSocket>::SocketAcceptor;
-
-    friend class LocalServerSocket;
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_POSIX_LOCALACCEPTOR_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/LocalClientSocket.cc
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/LocalClientSocket.cc	(revision 8)
+++ 	(revision )
@@ -1,58 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "LocalClientSocket.h"
-
-#include "LocalConnector.h"
-
-#include <sys/socket.h>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::LocalClientSocket;
-
-//------------------------------------------------------------------------------
-
-LocalClientSocket::LocalClientSocket(const char* name, Waiter* waiter,
-                                     size_t readingCapacity,
-                                     size_t writingCapacity) :
-    ClientSocket(AF_UNIX, SOCK_STREAM, connector, waiter, 0,
-                 readingCapacity, writingCapacity),
-    connector(this, name)
-{
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/LocalClientSocket.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/LocalClientSocket.h	(revision 8)
+++ 	(revision )
@@ -1,100 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_POSIX_LOCALCLIENTSOCKET_H
-#define HU_VARADIISTVAN_SCPL_IO_POSIX_LOCALCLIENTSOCKET_H
-//------------------------------------------------------------------------------
-
-#include "ClientSocket.h"
-
-#include "LocalConnector.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * Client socket that connects to a server socket locally (i.e. a Unit
- * socket).
- *
- * The server socket's name should be given. The name will be used as
- * described for LocalServerSocket.
- */
-class LocalClientSocket : public ClientSocket
-{
-private:
-    /**
-     * The address to use for connecting.
-     */
-    LocalConnector connector;
-
-public:
-    /**
-     * Construct the client socket with the given name.
-     *
-     * @param waiter the waiter to use for waiting a possible event
-     * occuring on the socket. If given, the socket will be
-     * non-blocking. Otherwise, it will be blocking, and the connect()
-     * function of the Connector might block as well as the reading
-     * and writing buffers.
-     */
-    LocalClientSocket(const char* name, Waiter* waiter = 0,
-                      size_t readingCapacity = DEFAULT_CAPACITY,
-                      size_t writingCapacity = DEFAULT_CAPACITY);
-
-    /**
-     * Get the connector for this client.
-     */
-    LocalConnector& getConnector();
-
-    friend class LocalConnector;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline LocalConnector& LocalClientSocket::getConnector()
-{
-    return connector;
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_POSIX_LOCALCLIENTSOCKET_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/LocalConnector.cc
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/LocalConnector.cc	(revision 8)
+++ 	(revision )
@@ -1,51 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "LocalConnector.h"
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::LocalConnector;
-
-//------------------------------------------------------------------------------
-
-const struct sockaddr* LocalConnector::getAddress(size_t& addrlen)
-{
-    addrlen = sizeof(address);
-    return reinterpret_cast<const struct sockaddr*>(&address);
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/LocalConnector.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/LocalConnector.h	(revision 8)
+++ 	(revision )
@@ -1,89 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_POSIX_LOCALCONNECTOR_H
-#define HU_VARADIISTVAN_SCPL_IO_POSIX_LOCALCONNECTOR_H
-//------------------------------------------------------------------------------
-
-#include "Connector.h"
-
-#include "LocalServerSocket.h"
-
-#include <sys/socket.h>
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * The connector class used by the local client socket.
- */
-class LocalConnector : public Connector
-{
-private:
-    /**
-     * The reference to the corresponding socket's address.
-     */
-    struct sockaddr_un address;
-
-public:
-    /**
-     * Create the connector for the given local client socket.
-     */
-    LocalConnector(ClientSocket* socket, const char* name);
-
-protected:
-    /**
-     * Get the address.
-     */
-    virtual const struct sockaddr* getAddress(size_t& addrlen);
-};
-
-//------------------------------------------------------------------------------
-
-inline LocalConnector::LocalConnector(ClientSocket* socket, const char* name) :
-    Connector(socket)
-{
-    address.sun_family = AF_UNIX;
-    LocalServerSocket::setupPath(address, name);
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_POSIX_LOCALCONNECTOR_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/LocalServerSocket.cc
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/LocalServerSocket.cc	(revision 8)
+++ 	(revision )
@@ -1,109 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "LocalServerSocket.h"
-
-#include <cstdio>
-
-#include <pwd.h>
-#include <unistd.h>
-#include <poll.h>
-
-#include <sys/socket.h>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::LocalServerSocket;
-
-//------------------------------------------------------------------------------
-
-void LocalServerSocket::setupPath(struct sockaddr_un& addr, const char* name)
-{
-#ifndef P_tmpdir
-#define P_tmpdir "/tmp"
-#endif
-    struct passwd* passwd = getpwuid(geteuid());
-    const char* userName = (passwd==0) ? "unknown" : passwd->pw_name;
-    snprintf(addr.sun_path, sizeof(addr.sun_path), "%s/%s-%s",
-             P_tmpdir, name, userName);
-}
-
-//------------------------------------------------------------------------------
-
-LocalServerSocket::LocalServerSocket(const char* name, Waiter* waiter) :
-    ServerSocket(AF_UNIX, SOCK_STREAM, waiter),
-    acceptor(this)
-{
-    sun.sun_family = AF_UNIX;
-    setupPath(sun, name);
-
-    unlink(sun.sun_path);
-
-    if (bind(reinterpret_cast<struct sockaddr*>(&sun), sizeof(sun), false)<0) {
-        setErrorCode(errno);
-        return;
-    }
-
-    if (listen()<0) {
-        setErrorCode(errno);
-        return;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-LocalServerSocket::~LocalServerSocket()
-{
-    unlink(sun.sun_path);
-}
-
-//------------------------------------------------------------------------------
-
-bool LocalServerSocket::isReady()
-{
-    return false;
-}
-
-//------------------------------------------------------------------------------
-
-void LocalServerSocket::handleEvents(short events)
-{
-    if ((events&POLLIN)==POLLIN) {
-        acceptor.accept();
-    }
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/LocalServerSocket.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/LocalServerSocket.h	(revision 8)
+++ 	(revision )
@@ -1,130 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_POSIX_LOCALSERVERSOCKET_H
-#define HU_VARADIISTVAN_SCPL_IO_POSIX_LOCALSERVERSOCKET_H
-//------------------------------------------------------------------------------
-
-#include "ServerSocket.h"
-
-#include "LocalAcceptor.h"
-
-#include <sys/un.h>
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * A server socket that works locally, i.e. a Unix socket.
- *
- * It is identified by a name that should be unique for the user. The
- * actual socket will be created with the name /tmp/<name>-<username>.
- */
-class LocalServerSocket : public ServerSocket
-{
-public:
-    /**
-     * Fill in the path of the socket with the given name.
-     */
-    static void setupPath(struct sockaddr_un& addr, const char* name);
-
-private:
-    /**
-     * Our address (to be used when deleting the file in the
-     * destructor.
-     */
-    struct sockaddr_un sun;
-
-    /**
-     * The acceptor to use for accepting connections.
-     */
-    LocalAcceptor acceptor;
-
-public:
-    /**
-     * Construct the socket with the given name.
-     *
-     * It will be bound to the name and able to listen for incoming
-     * connections.
-     *
-     * @param waiter the waiter to use for waiting a possible event
-     * occuring on the socket. If given, the socket will be
-     * non-blocking. Otherwise, it will be blocking, and the accept()
-     * function of the Acceptor might block.
-     */
-    LocalServerSocket(const char* name, Waiter* waiter = 0);
-
-    /**
-     * Destroy the socket by deleting the file.
-     */
-    virtual ~LocalServerSocket();
-
-    /**
-     * Get the acceptor.
-     */
-    LocalAcceptor& getAcceptor();
-
-protected:
-    /**
-     * Indicate if the waitable is ready, i.e. there is no need to
-     * wait for it.
-     */
-    virtual bool isReady();
-
-    /**
-     * Handle the given events.
-     */
-    virtual void handleEvents(short events);
-
-    friend class LocalAcceptor;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline LocalAcceptor& LocalServerSocket::getAcceptor()
-{
-    return acceptor;
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_POSIX_LOCALSERVERSOCKET_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/LocalSocket.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/LocalSocket.h	(revision 32)
+++ 	(revision )
@@ -1,79 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_POSIX_LOCALSOCKET_H
-#define HU_VARADIISTVAN_SCPL_IO_POSIX_LOCALSOCKET_H
-//------------------------------------------------------------------------------
-
-#include "Socket.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * A socket that works on a local (Unix) connection.
- */
-class LocalSocket : public Socket
-{
-private:
-    /**
-     * Construct the socket with the given parameters.
-     */
-    LocalSocket(int fd, Waiter* waiter = 0,
-                size_t readingCapacity = DEFAULT_CAPACITY,
-                size_t writingCapacity = DEFAULT_CAPACITY);
-
-    friend class SocketAcceptor<LocalSocket>;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline LocalSocket::LocalSocket(int fd, Waiter* waiter,
-                                size_t readingCapacity,
-                                size_t writingCapacity) :
-    Socket(fd, waiter, readingCapacity, writingCapacity)
-{
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_POSIX_LOCALSOCKET_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/Makefile.am
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/Makefile.am	(revision 33)
+++ 	(revision )
@@ -1,51 +1,0 @@
-AM_CPPFLAGS=-I$(top_builddir)/src
-
-SUBDIRS=
-
-noinst_LTLIBRARIES=libvscpl_io_posix.la
-
-libvscpl_io_posix_la_SOURCES=   \
-        Waitable.cc             \
-        Waiter.cc               \
-        WaitableEvent.cc        \
-        BufferedStream.cc       \
-        ReadingBuffer.cc        \
-        WritingBuffer.cc        \
-        Socket.cc               \
-        Connector.cc            \
-        ClientSocket.cc         \
-        LocalConnector.cc       \
-        LocalClientSocket.cc    \
-	TCPConnector.cc		\
-	TCPClientSocket.cc	\
-        Acceptor.cc             \
-	SocketAcceptor.h	\
-	ServerSocket.cc         \
-        LocalServerSocket.cc	\
-	TCPServerSocket.cc
-
-include_vscpl_io_posixdir=$(includedir)/hu/varadiistvan/scpl/io/_posix
-include_vscpl_io_posix_HEADERS= \
-        Waitable.h              \
-        Waiter.h                \
-        WaitableEvent.h         \
-        BufferedStream.h        \
-        StreamBuffer.h          \
-        ReadingBuffer.h         \
-        WritingBuffer.h         \
-        Socket.h                \
-        Connector.h             \
-        ClientSocket.h          \
-        LocalConnector.h        \
-        LocalClientSocket.h     \
-	TCPConnector.h		\
-	TCPClientSocket.h	\
-        Acceptor.h              \
-        SocketAcceptor.h        \
-        ServerSocket.h          \
-        LocalSocket.h           \
-        LocalAcceptor.h         \
-        LocalServerSocket.h     \
-        TCPSocket.h             \
-        TCPAcceptor.h           \
-	TCPServerSocket.h
Index: c/hu/varadiistvan/scpl/io/_posix/ReadingBuffer.cc
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/ReadingBuffer.cc	(revision 6)
+++ 	(revision )
@@ -1,76 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "ReadingBuffer.h"
-
-#include "BufferedStream.h"
-
-#include <cassert>
-
-#include <poll.h>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::ReadingBuffer;
-
-//------------------------------------------------------------------------------
-
-bool ReadingBuffer::read()
-{
-    if (failed()) return false;
-
-    if (getLength()>0) {
-        stream.events &= ~POLLIN;
-        return true;
-    }
-
-    ssize_t result = stream.read(getData(), getCapacity());
-    if (result<0) {
-        if (stream.failed()) {
-            stream.events &= ~POLLIN;
-        } else {
-            stream.events |= POLLIN;
-        }
-    } else {
-        stream.events &= ~POLLIN;
-        size_t added = addLength(result);
-        assert(static_cast<ssize_t>(added)==result);
-        assert(static_cast<ssize_t>(getLength())==result);
-    }
-    return result>=0;
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/ReadingBuffer.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/ReadingBuffer.h	(revision 6)
+++ 	(revision )
@@ -1,100 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_POSIX_READINGBUFFER_H
-#define HU_VARADIISTVAN_SCPL_IO_POSIX_READINGBUFFER_H
-//------------------------------------------------------------------------------
-
-#include "StreamBuffer.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * A buffer used for reading.
- *
- * It should be made empty, and then the function read() should be
- * called on it. If it returns true, some data could be read. If the
- * amount of data read is 0, that indicates and end-of-file condition.
- */
-class ReadingBuffer : public StreamBuffer
-{
-protected:
-    /**
-     * Construct the buffer.
-     */
-    ReadingBuffer(size_t capacity, BufferedStream* stream);
-
-public:
-    /**
-     * Read into the buffer using the buffered stream if possible.
-     *
-     * If the buffer contains data, this function returns immediately
-     * with success, so the buffer should be reset before reading.
-     *
-     * If some data can be read immediately, that is stored in the
-     * buffer, and success is indicated. Success is indicated even if
-     * the amount of data read is 0, allowing for signalling the
-     * end-of-file or end-of-connection condition.
-     *
-     * If the reading operation would block, the stream is set up so
-     * that it would read, and failure is returned.
-     *
-     * Otherwise, if the reading operation fails for some other
-     * reason, the buffer's error code is set, so it should always be
-     * checked on a failure!
-     */
-    bool read();
-
-    friend class BufferedStream;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline ReadingBuffer::ReadingBuffer(size_t capacity, BufferedStream* stream) :
-    StreamBuffer(capacity, stream)
-{
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_POSIX_READINGBUFFER_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/ServerSocket.cc
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/ServerSocket.cc	(revision 8)
+++ 	(revision )
@@ -1,112 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "ServerSocket.h"
-
-#include "Socket.h"
-
-#include <unistd.h>
-#include <sys/socket.h>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::ServerSocket;
-using hu::varadiistvan::scpl::io::Acceptor;
-
-//------------------------------------------------------------------------------
-
-ServerSocket::ServerSocket(int domain, int type, Waiter* waiter, int protocol) :
-    Waitable(waiter, Socket::socket(domain, type, protocol))
-{
-    if (fd<0) setErrorCodeFromErrno();
-    else if (waiter!=0) setNonBlocking(fd);
-}
-
-//------------------------------------------------------------------------------
-
-ServerSocket::~ServerSocket()
-{
-    if (fd>=0) ::close(fd);
-}
-
-//------------------------------------------------------------------------------
-
-bool ServerSocket::bind(const struct sockaddr* addr, size_t addrlen,
-                        bool reuseaddr)
-{
-    if (reuseaddr) {
-        int reuse = 1;
-        if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof(reuse))<0) {
-            setErrorCodeFromErrno();
-            return false;
-        }
-    }
-
-    if (::bind(fd, addr, addrlen)<0) {
-        setErrorCodeFromErrno();
-        return false;
-    }
-
-    return true;
-}
-
-//------------------------------------------------------------------------------
-
-bool ServerSocket::listen(int backlog)
-{
-    if (::listen(fd, backlog)<0) {
-        setErrorCodeFromErrno();
-        return false;
-    } else {
-        return true;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-int ServerSocket::accept(struct sockaddr* addr, size_t* addrlen)
-{
-    socklen_t alen = (addrlen==0) ? 0 : *addrlen;
-    int result = ::accept(fd, addr, (addrlen==0) ? 0 : &alen);
-    if (result<0 && errno!=EAGAIN && errno!=EWOULDBLOCK) {
-        setErrorCodeFromErrno();
-    } else {
-        if (addrlen!=0) *addrlen = alen;
-    }
-    return result;
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/ServerSocket.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/ServerSocket.h	(revision 8)
+++ 	(revision )
@@ -1,114 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_POSIX_SERVERSOCKET_H
-#define HU_VARADIISTVAN_SCPL_IO_POSIX_SERVERSOCKET_H
-//------------------------------------------------------------------------------
-
-#include "Waitable.h"
-
-#include <cstdlib>
-
-//------------------------------------------------------------------------------
-
-struct sockaddr;
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-class Acceptor;
-
-//------------------------------------------------------------------------------
-
-/**
- * A socket in a server role. It can only bind to a new address,
- * listen and accept connections. It cannot connect to other sockets
- * and cannot be read or written.
- */
-class ServerSocket : public Waitable
-{
-protected:
-    /**
-     * Construct the server socket.
-     */
-    ServerSocket(int domain, int type, Waiter* waiter = 0, int protocol = 0);
-
-public:
-    /**
-     * Destroy the server socket.
-     */
-    virtual ~ServerSocket();
-
-protected:
-    /**
-     * Bind the socket to the given address.
-     *
-     * @param reuseaddr if set to true, the SO_REUSEADDR socket option
-     * will be set.
-     *
-     * @return if the binding has succeeded. If it is false, the error
-     * code will be set accordingly.
-     */
-    bool bind(const struct sockaddr* addr, size_t addrlen,
-              bool reuseaddr = true);
-
-    /**
-     * Start listening on the socket.
-     *
-     * @return if the call has succeeded. If it is false, the error
-     * code will be set accordingly.
-     */
-    bool listen(int backlog = 5);
-
-    /**
-     * Accept a socket.
-     *
-     * @return the accepted socket. If may be -1, if the socket is
-     * non-blocking, and no connection is available yet, or if another
-     * error occured, in which case the error code will be set properly.
-     */
-    int accept(struct sockaddr* addr, size_t* addrlen);
-
-    friend class Acceptor;
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_POSIX_SERVERSOCKET_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/Socket.cc
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/Socket.cc	(revision 8)
+++ 	(revision )
@@ -1,60 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "Socket.h"
-
-#include <unistd.h>
-#include <sys/socket.h>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::Socket;
-
-//------------------------------------------------------------------------------
-
-int Socket::socket(int domain, int type, int protocol)
-{
-    return ::socket(domain, type, protocol);
-}
-
-//------------------------------------------------------------------------------
-
-Socket::~Socket()
-{
-    if (fd>=0) ::close(fd);
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/Socket.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/Socket.h	(revision 8)
+++ 	(revision )
@@ -1,113 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_POSIX_SOCKET_H
-#define HU_VARADIISTVAN_SCPL_IO_POSIX_SOCKET_H
-//------------------------------------------------------------------------------
-
-#include "BufferedStream.h"
-
-//------------------------------------------------------------------------------
-
-struct sockaddr;
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * A buffered, waitable socket implementation.
- */
-class Socket : public BufferedStream
-{
-private:
-    /**
-     * Construct a socket with the given parameters.
-     */
-    static int socket(int domain, int type, int protocol);
-
-protected:
-    /**
-     * Construct the socket with the given parameters.
-     */
-    Socket(int domain, int type, Waiter* waiter = 0, int protocol = 0,
-           size_t readingCapacity = DEFAULT_CAPACITY,
-           size_t writingCapacity = DEFAULT_CAPACITY);
-
-    /**
-     * Construct the socket with the given file descriptor.
-     */
-    Socket(int fd, Waiter* waiter = 0,
-           size_t readingCapacity = DEFAULT_CAPACITY,
-           size_t writingCapacity = DEFAULT_CAPACITY);
-
-public:
-    /**
-     * Destroy the socket by closing the file descriptor.
-     */
-    virtual ~Socket();
-
-    friend class ServerSocket;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline Socket::Socket(int domain, int type, Waiter* waiter, int protocol,
-                      size_t readingCapacity, size_t writingCapacity) :
-    BufferedStream(waiter, socket(domain, type, protocol),
-                     readingCapacity, writingCapacity)
-{
-    if (fd<0) setErrorCodeFromErrno();
-    else if (waiter!=0) setNonBlocking(fd);
-}
-
-//------------------------------------------------------------------------------
-
-inline Socket::Socket(int fd, Waiter* waiter,
-                      size_t readingCapacity, size_t writingCapacity) :
-    BufferedStream(waiter, fd, readingCapacity, writingCapacity)
-{
-    if (waiter!=0) setNonBlocking(fd);
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_POSIX_SOCKET_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/SocketAcceptor.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/SocketAcceptor.h	(revision 32)
+++ 	(revision )
@@ -1,132 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#pragma once
-
-//------------------------------------------------------------------------------
-
-#include "Acceptor.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * Socket acceptor template for a certain kind of client sockets.
- */
-template <class Socket>
-class SocketAcceptor : public Acceptor
-{
-protected:
-    /**
-     * Construct the acceptor.
-     */
-    SocketAcceptor(ServerSocket* socket);
-
-public:
-    /**
-     * Get the socket accepted last. If no socket was accepted,
-     * return 0. The socket's waiter will be the given one
-     * (which can be 0).
-     */
-    Socket* getSocket(Waiter* waiter,
-                      size_t readingCapacity = Socket::DEFAULT_CAPACITY,
-                      size_t writingCapacity = Socket::DEFAULT_CAPACITY);
-    /**
-     * Get the socket accepted last. If no socket was accepted,
-     * return 0. The socket's waiter will be the same as that of
-     * the associated server socket.
-     */
-    Socket* getSocket(size_t readingCapacity = Socket::DEFAULT_CAPACITY,
-                      size_t writingCapacity = Socket::DEFAULT_CAPACITY);
-
-    /**
-     * Get the last accepted socket as a buffered stream with the given waiter,
-     * if any.
-     */
-    BufferedStream* getAcceptedBufferedStream(Waiter* waiter = nullptr) override;
-};
-
-//------------------------------------------------------------------------------
-// Template definitions
-//------------------------------------------------------------------------------
-
-template <class Socket>
-inline SocketAcceptor<Socket>::SocketAcceptor(ServerSocket* socket) :
-    Acceptor(socket)
-{
-}
-
-//------------------------------------------------------------------------------
-
-template <class Socket>
-inline Socket*
-SocketAcceptor<Socket>::getSocket(Waiter* waiter,
-                                  size_t readingCapacity,
-                                  size_t writingCapacity)
-{
-    if (acceptedFD<0) return 0;
-
-    Socket* socket = new Socket(acceptedFD, waiter,
-                                readingCapacity, writingCapacity);
-    connectionProcessed();
-    return socket;
-}
-
-//------------------------------------------------------------------------------
-
-template <class Socket>
-inline Socket*
-SocketAcceptor<Socket>::getSocket(size_t readingCapacity,
-                                  size_t writingCapacity)
-{
-    return getSocket(socket.getWaiter(), readingCapacity, writingCapacity);
-}
-
-//------------------------------------------------------------------------------
-
-template <class Socket>
-BufferedStream* SocketAcceptor<Socket>::
-getAcceptedBufferedStream(Waiter* waiter)
-{
-    return (waiter==nullptr) ? getSocket() : getSocket(waiter);
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/StreamBuffer.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/StreamBuffer.h	(revision 6)
+++ 	(revision )
@@ -1,110 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_POSIX_STREAMBUFFER_H
-#define HU_VARADIISTVAN_SCPL_IO_POSIX_STREAMBUFFER_H
-//------------------------------------------------------------------------------
-
-#include "../Buffer.h"
-#include "../Failable.h"
-
-#include "BufferedStream.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * Base class for buffers used by a BufferedStream.
- */
-class StreamBuffer : public Buffer, public FailableReference<StreamBuffer>
-{
-protected:
-    /**
-     * Our buffered stream.
-     */
-    BufferedStream& stream;
-
-protected:
-    /**
-     * Construct the buffer with the given waitable.
-     */
-    StreamBuffer(size_t capacity, BufferedStream* stream);
-
-private:
-    /**
-     * Get the failable object.
-     */
-    const Failable& getFailable() const;
-
-    /**
-     * Get the failable object.
-     */
-    Failable& getFailable();
-
-    friend class FailableReference<StreamBuffer>;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline StreamBuffer::StreamBuffer(size_t capacity, BufferedStream* stream) :
-    Buffer(capacity),
-    stream(*stream)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline const Failable& StreamBuffer::getFailable() const
-{
-    return stream;
-}
-
-//------------------------------------------------------------------------------
-
-inline Failable& StreamBuffer::getFailable()
-{
-    return stream;
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_POSIX_STREAMBUFFER_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/TCPAcceptor.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/TCPAcceptor.h	(revision 33)
+++ 	(revision )
@@ -1,64 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#pragma once
-
-//------------------------------------------------------------------------------
-
-#include "SocketAcceptor.h"
-
-#include "TCPSocket.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * An acceptor that provides a TCPSocket for each accepted connection
- */
-class TCPAcceptor : public SocketAcceptor<TCPSocket>
-{
-private:
-    using SocketAcceptor<TCPSocket>::SocketAcceptor;
-
-    friend class TCPServerSocket;
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/TCPClientSocket.cc
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/TCPClientSocket.cc	(revision 33)
+++ 	(revision )
@@ -1,70 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "TCPClientSocket.h"
-
-#include <cstdio>
-
-#include <arpa/inet.h>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::TCPClientSocket;
-
-//------------------------------------------------------------------------------
-
-struct in_addr TCPClientSocket::str2address(const char* addressStr)
-{
-    struct in_addr address;
-    if (inet_pton(AF_INET, addressStr, &address)<0) {
-        perror("inet_pton");
-    }
-    return address;
-}
-
-//------------------------------------------------------------------------------
-
-TCPClientSocket::TCPClientSocket(struct in_addr address, unsigned short port,
-                                 Waiter* waiter,
-                                 size_t readingCapacity,
-                                 size_t writingCapacity) :
-    ClientSocket(AF_INET, SOCK_STREAM, connector, waiter, 0,
-                 readingCapacity, writingCapacity),
-    connector(this, address, port)
-{
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/TCPClientSocket.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/TCPClientSocket.h	(revision 33)
+++ 	(revision )
@@ -1,130 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#pragma once
-
-//------------------------------------------------------------------------------
-
-#include "ClientSocket.h"
-
-#include "TCPConnector.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * Client socket that connects to a TCP server socket.
- *
- * The server socket's address and port should be given.
- */
-class TCPClientSocket : public ClientSocket
-{
-public:
-    /**
-     * Convert the given string to an address
-     */
-    static struct in_addr str2address(const char* addressStr);
-
-private:
-    /**
-     * The address to use for connecting.
-     */
-    TCPConnector connector;
-
-public:
-    /**
-     * Construct the client socket with the given address and port.
-     *
-     * @param waiter the waiter to use for waiting a possible event
-     * occuring on the socket. If given, the socket will be
-     * non-blocking. Otherwise, it will be blocking, and the connect()
-     * function of the Connector might block as well as the reading
-     * and writing buffers.
-     */
-    TCPClientSocket(struct in_addr address, unsigned short port,
-                    Waiter* waiter = 0,
-                    size_t readingCapacity = DEFAULT_CAPACITY,
-                    size_t writingCapacity = DEFAULT_CAPACITY);
-
-    /**
-     * Construct the client socket with the given address and port.
-     *
-     * @param waiter the waiter to use for waiting a possible event
-     * occuring on the socket. If given, the socket will be
-     * non-blocking. Otherwise, it will be blocking, and the connect()
-     * function of the Connector might block as well as the reading
-     * and writing buffers.
-     */
-    TCPClientSocket(const char* address, unsigned short port,
-                    Waiter* waiter = 0,
-                    size_t readingCapacity = DEFAULT_CAPACITY,
-                    size_t writingCapacity = DEFAULT_CAPACITY);
-
-    /**
-     * Get the connector for this client.
-     */
-    TCPConnector& getConnector();
-
-    friend class TCPConnector;
-};
-
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline TCPClientSocket::TCPClientSocket(const char* address, unsigned short port,
-                                        Waiter* waiter,
-                                        size_t readingCapacity,
-                                        size_t writingCapacity) :
-    TCPClientSocket(str2address(address), port, waiter,
-                    readingCapacity, writingCapacity)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline TCPConnector& TCPClientSocket::getConnector()
-{
-    return connector;
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/TCPConnector.cc
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/TCPConnector.cc	(revision 33)
+++ 	(revision )
@@ -1,51 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "TCPConnector.h"
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::TCPConnector;
-
-//------------------------------------------------------------------------------
-
-const struct sockaddr* TCPConnector::getAddress(size_t& addrlen)
-{
-    addrlen = sizeof(address);
-    return reinterpret_cast<const struct sockaddr*>(&address);
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/TCPConnector.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/TCPConnector.h	(revision 33)
+++ 	(revision )
@@ -1,91 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#pragma once
-
-//------------------------------------------------------------------------------
-
-#include "Connector.h"
-
-#include <netinet/in.h>
-#include <sys/socket.h>
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * The connector class used by the TCP client socket.
- */
-class TCPConnector : public Connector
-{
-private:
-    /**
-     * The socket address to connect to.
-     */
-    struct sockaddr_in address;
-
-public:
-    /**
-     * Create the connector for the given TCP client socket.
-     */
-    TCPConnector(ClientSocket* socket,
-                 struct in_addr address, unsigned short port);
-
-protected:
-    /**
-     * Get the address.
-     */
-    virtual const struct sockaddr* getAddress(size_t& addrlen);
-
-};
-
-//------------------------------------------------------------------------------
-
-inline TCPConnector::TCPConnector(ClientSocket* socket,
-                                  struct in_addr address, unsigned short port) :
-    Connector(socket)
-{
-    this->address.sin_family = AF_INET;
-    this->address.sin_addr = address;
-    this->address.sin_port = htons(port);
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/TCPServerSocket.cc
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/TCPServerSocket.cc	(revision 39)
+++ 	(revision )
@@ -1,86 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "TCPServerSocket.h"
-
-#include <poll.h>
-
-#include <netinet/in.h>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::TCPServerSocket;
-
-//------------------------------------------------------------------------------
-
-TCPServerSocket::TCPServerSocket(unsigned short port, Waiter* waiter) :
-    ServerSocket(AF_INET, SOCK_STREAM, waiter),
-    acceptor(this)
-{
-    struct sockaddr_in sin;
-    sin.sin_family = AF_INET;
-    sin.sin_addr.s_addr = INADDR_ANY;
-    sin.sin_port = htons(port);
-
-    if (bind(reinterpret_cast<struct sockaddr*>(&sin), sizeof(sin))<0) {
-        setErrorCode(errno);
-        return;
-    }
-
-    if (listen()<0) {
-        setErrorCode(errno);
-        return;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-bool TCPServerSocket::isReady()
-{
-    return false;
-}
-
-//------------------------------------------------------------------------------
-
-void TCPServerSocket::handleEvents(short events)
-{
-    if ((events&POLLIN)==POLLIN) {
-        acceptor.accept();
-    }
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/TCPServerSocket.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/TCPServerSocket.h	(revision 33)
+++ 	(revision )
@@ -1,105 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#pragma once
-
-//------------------------------------------------------------------------------
-
-#include "ServerSocket.h"
-
-#include "TCPAcceptor.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * A server socket that provides a TCP access point.
- */
-class TCPServerSocket : public ServerSocket
-{
-private:
-    /**
-     * The acceptor to use for accepting connections
-     */
-    TCPAcceptor acceptor;
-
-public:
-    /**
-     * Construct the server socket to listen at the given port.
-     *
-     * @param port the number of the port to listen at
-     * @param waiter the waiter to use for waiting a possible event
-     * occuring on the socket. If given, the socket will be
-     * non-blocking. Otherwise, it will be blocking, and the accept()
-     * function of the Acceptor might block.
-     */
-    TCPServerSocket(unsigned short port, Waiter* waiter = nullptr);
-
-    /**
-     * Get the acceptor.
-     */
-    TCPAcceptor& getAcceptor();
-
-protected:
-    /**
-     * Indicate if the waitable is ready, i.e. there is no need to
-     * wait for it.
-     */
-    virtual bool isReady();
-
-    /**
-     * Handle the given events.
-     */
-    virtual void handleEvents(short events);
-
-    friend class TCPAcceptor;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline TCPAcceptor& TCPServerSocket::getAcceptor()
-{
-    return acceptor;
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/TCPSocket.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/TCPSocket.h	(revision 33)
+++ 	(revision )
@@ -1,78 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#pragma once
-
-//------------------------------------------------------------------------------
-
-#include "Socket.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * A socket that works on a TCP connection.
- */
-class TCPSocket : public Socket
-{
-private:
-    /**
-     * Construct the socket with the given parameters.
-     */
-    TCPSocket(int fd, Waiter* waiter = 0,
-              size_t readingCapacity = DEFAULT_CAPACITY,
-              size_t writingCapacity = DEFAULT_CAPACITY);
-
-    friend class SocketAcceptor<TCPSocket>;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline TCPSocket::TCPSocket(int fd, Waiter* waiter,
-                            size_t readingCapacity,
-                            size_t writingCapacity) :
-    Socket(fd, waiter, readingCapacity, writingCapacity)
-{
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/Waitable.cc
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/Waitable.cc	(revision 6)
+++ 	(revision )
@@ -1,71 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "Waitable.h"
-
-#include "Waiter.h"
-
-#include <fcntl.h>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::Waitable;
-
-//------------------------------------------------------------------------------
-
-void Waitable::setNonBlocking(int fd)
-{
-    fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK);
-}
-
-//------------------------------------------------------------------------------
-
-Waitable::Waitable(Waiter* waiter, int fd, short events) :
-    waiter(waiter),
-    fd(fd),
-    events(events)
-{
-    if (waiter!=0) waiter->add(this);
-}
-
-//------------------------------------------------------------------------------
-
-Waitable::~Waitable()
-{
-    if (waiter!=0) waiter->remove(this);
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/Waitable.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/Waitable.h	(revision 6)
+++ 	(revision )
@@ -1,161 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_POSIX_WAITABLE_H
-#define HU_VARADIISTVAN_SCPL_IO_POSIX_WAITABLE_H
-//------------------------------------------------------------------------------
-
-#include "../Failable.h"
-
-#include <cerrno>
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-class Waiter;
-
-//------------------------------------------------------------------------------
-
-/**
- * Base class of objects for which one can wait in a Waiter.
- *
- * It is basically a file descriptor.
- */
-class Waitable : public Failable
-{
-public:
-    /**
-     * Set the given file descriptor to non-blocking.
-     */
-    static void setNonBlocking(int fd);
-
-protected:
-    /**
-     * The waiter this waitable belongs to, if any.
-     */
-    Waiter* waiter;
-
-    /**
-     * The file descriptor
-     */
-    int fd;
-
-    /**
-     * The events this waitable is interested in.
-     */
-    short events;
-
-protected:
-    /**
-     * Construct the waitable.
-     */
-    Waitable(Waiter* waiter, int fd = -1, short events = 0);
-
-public:
-    /**
-     * Destroy the waitable. It will be removed from the waiter.
-     */
-    virtual ~Waitable();
-
-    /**
-     * Get the waiter.
-     */
-    Waiter* getWaiter() const;
-
-    /**
-     * Determine if the waitable is ready or not, i.e. if there is no
-     * need to wait for it.
-     *
-     * It first checks the events. If they are 0, the waitable is
-     * ready. Then it calls isReady() and returns the result of that
-     * function.
-     */
-    bool ready();
-
-protected:
-    /**
-     * Indicate if the waitable is ready, i.e. there is no need to
-     * wait for it.
-     *
-     * Calling this function should not delete the ready
-     * indication. It should be deleted by actually processing the
-     * data.
-     */
-    virtual bool isReady() = 0;
-
-    /**
-     * Handle the given events.
-     */
-    virtual void handleEvents(short events) = 0;
-
-    /**
-     * Set the error code from errno.
-     */
-    void setErrorCodeFromErrno();
-
-    friend class Waiter;
-};
-
-//------------------------------------------------------------------------------
-// Inline defintions
-//------------------------------------------------------------------------------
-
-inline Waiter* Waitable::getWaiter() const
-{
-    return waiter;
-}
-
-//------------------------------------------------------------------------------
-
-inline bool Waitable::ready()
-{
-    return (events==0) || isReady();
-}
-
-//------------------------------------------------------------------------------
-
-inline void Waitable::setErrorCodeFromErrno()
-{
-    setErrorCode(errno);
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_POSIX_WAITABLE_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/WaitableEvent.cc
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/WaitableEvent.cc	(revision 7)
+++ 	(revision )
@@ -1,126 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "WaitableEvent.h"
-
-#include <poll.h>
-#include <unistd.h>
-
-#include <sys/eventfd.h>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::WaitableEvent;
-
-//------------------------------------------------------------------------------
-
-WaitableEvent::WaitableEvent(Waiter* waiter) :
-    Waitable(waiter, eventfd(0, (waiter==0) ? 0 : EFD_NONBLOCK), POLLIN),
-    fired(false)
-{
-    if (fd<0) {
-        setErrorCodeFromErrno();
-    }
-}
-
-//------------------------------------------------------------------------------
-
-WaitableEvent::~WaitableEvent()
-{
-    close(fd);
-}
-
-//------------------------------------------------------------------------------
-
-void WaitableEvent::fire()
-{
-    static const uint64_t one = 1;
-    if (write(fd, &one, sizeof(one))<0) {
-        if (errno!=EAGAIN) {
-            setErrorCodeFromErrno();
-        }
-    }
-}
-
-//------------------------------------------------------------------------------
-
-bool WaitableEvent::check()
-{
-    if (doCheck()) {
-        fired = false;
-        return true;
-    } else {
-        return false;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-bool WaitableEvent::isReady()
-{
-    return fired;
-}
-
-//------------------------------------------------------------------------------
-
-void WaitableEvent::handleEvents(short events)
-{
-    if ((events&POLLIN)==POLLIN) {
-        doCheck();
-    }
-}
-
-//------------------------------------------------------------------------------
-
-bool WaitableEvent::doCheck(bool fromHandleEvents)
-{
-    if (failed()) return false;
-    if (!fromHandleEvents && fired) return true;
-
-    uint64_t value = 0;
-    if (read(fd, &value, sizeof(value))<0) {
-        if (errno!=EAGAIN) {
-            setErrorCodeFromErrno();
-        }
-    } else {
-        fired = fired || value>0;
-    }
-
-    return fired;
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/WaitableEvent.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/WaitableEvent.h	(revision 7)
+++ 	(revision )
@@ -1,107 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_POSIX_WAITABLEEVENT_H
-#define HU_VARADIISTVAN_SCPL_IO_POSIX_WAITABLEEVENT_H
-//------------------------------------------------------------------------------
-
-#include "Waitable.h"
-
-#include "../Failable.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * An event on which one can wait with a waiter.
- */
-class WaitableEvent : public Waitable
-{
-private:
-    /**
-     * Indicate if the event is fired.
-     */
-    volatile bool fired;
-
-public:
-    /**
-     * Construct the event.
-     */
-    WaitableEvent(Waiter* waiter = 0);
-
-    /**
-     * Destroy the event.
-     */
-    virtual ~WaitableEvent();
-
-    /**
-     * Fire the event.
-     */
-    void fire();
-
-    /**
-     * Check if the event is fired or not. If so, the fired status
-     * will be cleared.
-     */
-    bool check();
-
-protected:
-    /**
-     * Check if the event is fired or not.
-     */
-    virtual bool isReady();
-
-    /**
-     * Handle the given events.
-     */
-    virtual void handleEvents(short events);
-
-private:
-    /**
-     * Perform the real check. If we already know that we are fired,
-     * just return true. Otherwise try to read from the event fd.
-     */
-    bool doCheck(bool fromHandleEvents = false);
-};
-
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_POSIX_WAITABLEEVENT_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/Waiter.cc
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/Waiter.cc	(revision 6)
+++ 	(revision )
@@ -1,153 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "Waiter.h"
-
-#include "Waitable.h"
-
-#include <cassert>
-#include <cerrno>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::Waiter;
-
-//------------------------------------------------------------------------------
-
-inline bool Waiter::hasReady() const
-{
-    for(waitables_t::const_iterator i = waitables.begin(); i!=waitables.end();
-        ++i)
-    {
-        Waitable* waitable = i->second;
-        if (waitable->ready()) {
-            return true;
-        }
-    }
-    return false;
-}
-
-//------------------------------------------------------------------------------
-
-inline size_t Waiter::setupPollFDs(pollfd* pollFDs)
-{
-    size_t numValid = 0;
-
-    for(waitables_t::const_iterator i = waitables.begin(); i!=waitables.end();
-        ++i)
-    {
-        Waitable* waitable = i->second;
-        if (waitable->events==0) continue;
-
-        pollfd& pollFD = pollFDs[numValid++];
-
-        pollFD.fd = waitable->fd;
-        pollFD.events = waitable->events;
-        pollFD.revents = 0;
-    }
-
-    return numValid;
-}
-
-//------------------------------------------------------------------------------
-
-inline void Waiter::processPollFDs(const pollfd* pollFDs, size_t size)
-{
-    for(size_t i = 0; i<size; ++i) {
-        const pollfd& pollFD = pollFDs[i];
-        if (pollFD.revents!=0) {
-            waitables_t::iterator j = waitables.find(pollFD.fd);
-            assert(j!=waitables.end());
-            Waitable* waitable = j->second;
-            waitable->handleEvents(pollFD.revents);
-        }
-    }
-}
-
-//------------------------------------------------------------------------------
-
-Waiter::~Waiter()
-{
-    for(waitables_t::iterator i = waitables.begin(); i!=waitables.end(); ++i)
-    {
-        Waitable* waitable = i->second;
-        waitable->waiter = 0;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-bool Waiter::wait(int timeout)
-{
-    if (hasReady()) return true;
-
-    pollfd pollFDs[numWaitables];
-    size_t numValid = setupPollFDs(pollFDs);
-
-    int result = poll(pollFDs, numValid, timeout);
-
-    if (result<0) {
-        setErrorCode(errno);
-        return false;
-    } else if (result>0) {
-        processPollFDs(pollFDs, numValid);
-    }
-
-    return hasReady();
-}
-
-//------------------------------------------------------------------------------
-
-void Waiter::add(Waitable* waitable)
-{
-    assert(waitable->fd>=0);
-    assert(waitables.find(waitable->fd)==waitables.end());
-    waitables[waitable->fd] = waitable;
-    ++numWaitables;
-}
-
-//------------------------------------------------------------------------------
-
-void Waiter::remove(Waitable* waitable)
-{
-    assert(numWaitables>0);
-    assert(waitables.find(waitable->fd)!=waitables.end());
-    assert(waitables[waitable->fd]==waitable);
-    waitables.erase(waitable->fd);
-    --numWaitables;
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/Waiter.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/Waiter.h	(revision 6)
+++ 	(revision )
@@ -1,154 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_POSIX_WAITER_H
-#define HU_VARADIISTVAN_SCPL_IO_POSIX_WAITER_H
-//------------------------------------------------------------------------------
-
-#include "../Failable.h"
-
-#include <map>
-
-#include <cstdlib>
-
-#include <poll.h>
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-class Waitable;
-
-//------------------------------------------------------------------------------
-
-/**
- * Class that can be used to register waitable objects and then wait
- * for them.
- */
-class Waiter : public Failable
-{
-private:
-    /**
-     * Type for the set of waitables.
-     */
-    typedef std::map<int, Waitable*> waitables_t;
-
-    /**
-     * The set of waitables belonging to this waiter.
-     */
-    waitables_t waitables;
-
-    /**
-     * The number of waitables.
-     */
-    size_t numWaitables;
-
-public:
-    /**
-     * Construct the waiter.
-     */
-    Waiter();
-
-    /**
-     * Destroy the waiter. All waitables that still exists will be
-     * modified to point to no waiter.
-     */
-    ~Waiter();
-
-    /**
-     * Wait for any if the waitables to become ready or until a
-     * timeout expires.
-     *
-     * If any of the waitables are ready, the function returns immediately.
-     *
-     * @return true if any of the waitables has become ready, false if
-     * the timeout occurs.
-     */
-    bool wait(int timeout = -1);
-
-protected:
-    /**
-     * Add a waitable.
-     */
-    void add(Waitable* waitable);
-
-    /**
-     * Remove a waitable.
-     */
-    void remove(Waitable* waitable);
-
-private:
-    /**
-     * Determine if any of the waitables is ready.
-     */
-    bool hasReady() const;
-
-    /**
-     * Fill the given array of poll descriptors with those file
-     * descriptors that wait for an event.
-     *
-     * @param pollFDs the file descriptor array to fill. It should
-     * contain at least as many elements as the number of waitables.
-     *
-     * @return the number of valid poll file descriptors.
-     */
-    size_t setupPollFDs(pollfd* pollFDs);
-
-    /**
-     * Process the given array of poll descriptors. For each
-     * descriptor, if its events are not 0, the handleEvents()
-     * function of the corresponding waitable is called.
-     */
-    void processPollFDs(const pollfd* pollFDs, size_t size);
-
-    friend class Waitable;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline Waiter::Waiter() :
-    numWaitables(0)
-{
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_POSIX_WAITER_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/WritingBuffer.cc
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/WritingBuffer.cc	(revision 6)
+++ 	(revision )
@@ -1,84 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "WritingBuffer.h"
-
-#include "BufferedStream.h"
-
-#include <poll.h>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::WritingBuffer;
-
-//------------------------------------------------------------------------------
-
-void WritingBuffer::reset()
-{
-    Buffer::reset();
-    offset = 0;
-    stream.events &= ~POLLOUT;
-}
-
-//------------------------------------------------------------------------------
-
-bool WritingBuffer::write()
-{
-    if (failed()) return false;
-
-    if (getLength()<=offset) {
-        reset();
-        return true;
-    }
-
-    size_t toWrite = getLength() - offset;
-
-    ssize_t result = stream.write(getData() + offset, toWrite);
-    if (result<static_cast<ssize_t>(toWrite)) {
-        if (result<0 && stream.failed()) {
-            stream.events &= ~POLLOUT;
-        } else {
-            stream.events |= POLLOUT;
-            if (result>0) offset += result;
-        }
-        return false;
-    } else {
-        reset();
-        return true;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_posix/WritingBuffer.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_posix/WritingBuffer.h	(revision 6)
+++ 	(revision )
@@ -1,113 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_POSIX_WRITINGBUFFER_H
-#define HU_VARADIISTVAN_SCPL_IO_POSIX_WRITINGBUFFER_H
-//------------------------------------------------------------------------------
-
-#include "StreamBuffer.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * A buffer used for writing.
- *
- * The data to write should be stored in the buffer. Then write()
- * should be called. If it returns true, it indicates that all data
- * has been written. In that case the buffer is automatically emptied.
- */
-class WritingBuffer : public StreamBuffer
-{
-private:
-    /**
-     * The offset of the next byte to write.
-     */
-    size_t offset;
-
-protected:
-    /**
-     * Construct the buffer.
-     */
-    WritingBuffer(size_t capacity, BufferedStream* stream);
-
-public:
-    /**
-     * Reset the buffer. It resets the offset too.
-     */
-    void reset();
-
-    /**
-     * Write the contents of the buffer using the associated buffered
-     * stream.
-     *
-     * If the buffer is empty, the function returns indicating
-     * success.
-     *
-     * If the complete remaining contents could be written, it also indicates
-     * success, and the buffer is reset, ready to be used again.
-     *
-     * If not everything can be written and the write operation
-     * indicates that it would block, this function returns failure
-     * after the stream has been set up  to handle the corresponding
-     * poll events.
-     *
-     * Otherwise, if the writing operation fails for some other
-     * reason, the buffer's error code is set to the error's code and
-     * false is returned.
-     */
-    bool write();
-
-    friend class BufferedStream;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline WritingBuffer::WritingBuffer(size_t capacity, BufferedStream* stream):
-    StreamBuffer(capacity, stream),
-    offset(0)
-{
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_POSIX_WRITINGBUFFER_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/.copyright
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/.copyright	(revision 6)
+++ 	(revision )
@@ -1,23 +1,0 @@
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
Index: c/hu/varadiistvan/scpl/io/_win32/.guardns
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/.guardns	(revision 6)
+++ 	(revision )
@@ -1,1 +1,0 @@
-win32
Index: c/hu/varadiistvan/scpl/io/_win32/.namespace
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/.namespace	(revision 6)
+++ 	(revision )
@@ -1,4 +1,0 @@
-hu
-varadiistvan
-scpl
-io
Index: c/hu/varadiistvan/scpl/io/_win32/.srcmessage
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/.srcmessage	(revision 6)
+++ 	(revision )
@@ -1,1 +1,0 @@
-// This file is part of VSCPL, a simple cross-platform utility library
Index: c/hu/varadiistvan/scpl/io/_win32/BufferedStream.cc
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/BufferedStream.cc	(revision 28)
+++ 	(revision )
@@ -1,113 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "BufferedStream.h"
-
-#include "ReadingBuffer.h"
-#include "WritingBuffer.h"
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::BufferedStream;
-
-//------------------------------------------------------------------------------
-
-BufferedStream::BufferedStream(std::unique_ptr<EventFactory> eventFactory,
-                               Waiter* waiter, HANDLE handle,
-                               size_t readingCapacity, size_t writingCapacity) :
-    Overlappable(std::move(eventFactory), waiter, handle),
-    readingBuffer( (readingCapacity==0) ? 0 :
-                   new ReadingBuffer(readingCapacity, this)),
-    writingBuffer( (writingCapacity==0) ? 0 :
-                   new WritingBuffer(writingCapacity, this))
-{
-}
-
-//------------------------------------------------------------------------------
-
-BufferedStream::~BufferedStream()
-{
-    delete writingBuffer;
-    delete readingBuffer;
-}
-
-//------------------------------------------------------------------------------
-
-ssize_t BufferedStream::read(void* dest, size_t length, Overlapped* overlapped)
-{
-    DWORD numRead = 0;
-    if (overlapped!=0) overlapped->reset();
-    bool result = ReadFile(handle, dest, length,
-                           (overlapped==0) ? &numRead : 0,
-                           (overlapped==0) ? 0 : overlapped->get());
-    DWORD error = GetLastError();
-    if (!result &&
-        (overlapped==0 ||
-         (error!=ERROR_IO_PENDING && error!=ERROR_IO_INCOMPLETE)))
-    {
-        setErrorCode(error);
-        return -1;
-    } else if (overlapped==0 || overlapped->getResult(numRead, handle)) {
-        return numRead;
-    } else {
-        return -1;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-bool BufferedStream::write(const void* src, size_t length,
-                           Overlapped* overlapped)
-{
-    if (overlapped!=0) overlapped->reset();
-    bool result = WriteFile(handle, src, length, 0,
-                            (overlapped==0) ? 0 : overlapped->get());
-    DWORD error = GetLastError();
-    if (!result &&
-        (overlapped==0 ||
-         (error!=ERROR_IO_PENDING && error!=ERROR_IO_INCOMPLETE)))
-    {
-        setErrorCode(error);
-        return false;
-    } else if (overlapped==0) {
-        return result;
-    } else {
-        DWORD numWritten = 0;
-        return overlapped->getResult(numWritten, handle);
-    }
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/BufferedStream.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/BufferedStream.h	(revision 28)
+++ 	(revision )
@@ -1,153 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_WIN32_BUFFEREDSTREAM_H
-#define HU_VARADIISTVAN_SCPL_IO_WIN32_BUFFEREDSTREAM_H
-//------------------------------------------------------------------------------
-
-#include "Overlappable.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-class ReadingBuffer;
-class WritingBuffer;
-class Overlapped;
-
-//------------------------------------------------------------------------------
-
-/**
- * A buffered stream.
- *
- * It wraps a HANDLE which can be read and/or written with ReadFile or
- * WriteFile, respectively.
- */
-class BufferedStream : public Overlappable
-{
-public:
-    /**
-     * The default capacity.
-     */
-    static const size_t DEFAULT_CAPACITY = 4096;
-
-private:
-    /**
-     * The reading buffer. It may be 0, if no reading buffer is
-     * associated with this waitable.
-     */
-    ReadingBuffer* readingBuffer;
-
-    /**
-     * The writing buffer. It may be 0, if no writing buffer is
-     * associated with this waitable.
-     */
-    WritingBuffer* writingBuffer;
-
-protected:
-    /**
-     * Construct the buffered stream.
-     */
-    BufferedStream(std::unique_ptr<EventFactory> eventFactory,
-                   Waiter* waiter = 0, HANDLE handle = 0,
-                   size_t readingCapacity = DEFAULT_CAPACITY,
-                   size_t writingCapacity = DEFAULT_CAPACITY);
-
-public:
-    /**
-     * Destroy the stream.
-     */
-    virtual ~BufferedStream();
-
-    /**
-     * Get the reference of the reading buffer. Note, that it can be a
-     * 0 reference, if the stream has no reading buffer.
-     */
-    ReadingBuffer& getReadingBuffer();
-
-    /**
-     * Get the reference of the writing buffer. Note, that it can be a
-     * 0 reference, if the stream has no writing buffer.
-     */
-    WritingBuffer& getWritingBuffer();
-
-protected:
-    /**
-     * Read using the handle at most the given number of bytes into
-     * the given buffer.
-     *
-     * @return the number of bytes read. If 0, it indicates the end of
-     * the file or connection. If negative, it means either a failure,
-     * or the fact that the operation cannot be completed at this time.
-     */
-    ssize_t read(void* dest, size_t length, Overlapped* overlapped);
-
-    /**
-     * Write using the handle the given number of bytes from the given
-     * buffer.
-     *
-     * @return whether the writing succeeded. If false, it is either a
-     * failure, or an inidication of the fact that the operation could
-     * not be completed.
-     */
-    bool write(const void* src, size_t length, Overlapped* overlapped);
-
-    friend class ReadingBuffer;
-    friend class WritingBuffer;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline ReadingBuffer& BufferedStream::getReadingBuffer()
-{
-    return *readingBuffer;
-}
-
-//------------------------------------------------------------------------------
-
-inline WritingBuffer& BufferedStream::getWritingBuffer()
-{
-    return *writingBuffer;
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_WIN32_BUFFEREDSTREAM_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/Completer.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/Completer.h	(revision 9)
+++ 	(revision )
@@ -1,219 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_WIN32_COMPLETER_H
-#define HU_VARADIISTVAN_SCPL_IO_WIN32_COMPLETER_H
-//------------------------------------------------------------------------------
-
-#include "../Failable.h"
-
-#include "Overlapped.h"
-#include "Overlappable.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * Base class for objects that handle the completion of some
- * operation. They are associated with an Overlappable, and if that
- * overlappable is non-blocking (i.e. has a waiter), an Overlapped
- * object is created and stored in this object.
- */
-class Completer : public FailableReference<Completer>
-{
-protected:
-    /**
-     * The overlappable object this completer belongs to.
-     */
-    Overlappable& overlappable;
-
-    /**
-     * The overlapped object.
-     */
-    Overlapped* overlapped;
-
-protected:
-    /**
-     * Construct the completer for the given Overlappable.
-     */
-    Completer(Overlappable* overlappable);
-
-    /**
-     * Destroy the completer.
-     */
-    virtual ~Completer();
-
-    /**
-     * Add the overlapped object (if any) to the given waiter.
-     */
-    void addTo(Waiter* waiter);
-
-    /**
-     * Remove the overlapped object (if any) from the waiter it is
-     * associated with.
-     */
-    void removeFromWaiter();
-
-    /**
-     * Determine if there is an overlapped object and it is being
-     * waited for.
-     */
-    bool isWaited() const;
-
-    /**
-     * Get the result of the overlapped operation, if any.
-     *
-     * @see Overlapped::getResult
-     */
-    bool getResult(DWORD& size);
-
-    /**
-     * Check whether we are waiting for an overlapped result and if
-     * so, return that.
-     *
-     * @param result will contain the result to return if we are
-     * waiting for an overlapped result.
-     *
-     * @return whether we are waiting for an overlapped result
-     */
-    bool checkWaitedResult(bool& result);
-
-    /**
-     * Handle the given result coming from an overlapped object.
-     */
-    virtual void handleWaitedResult(DWORD size) = 0;
-
-private:
-    /**
-     * Get the failable object.
-     */
-    const Failable& getFailable() const;
-
-    /**
-     * Get the failable object.
-     */
-    Failable& getFailable();
-
-    friend class FailableReference<Completer>;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline Completer::Completer(Overlappable* overlappable) :
-    overlappable(*overlappable),
-    overlapped((overlappable->waiter==0) ? 0 : new Overlapped(*overlappable))
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline Completer::~Completer()
-{
-    delete overlapped;
-}
-
-//------------------------------------------------------------------------------
-
-inline void Completer::addTo(Waiter* waiter)
-{
-    if (overlapped!=0 && waiter!=0) overlapped->addTo(*waiter);
-}
-
-//------------------------------------------------------------------------------
-
-inline void Completer::removeFromWaiter()
-{
-    if (overlapped!=0) overlapped->removeFromWaiter();
-}
-
-//------------------------------------------------------------------------------
-
-inline bool Completer::isWaited() const
-{
-    return overlapped!=0 && overlapped->isWaited();
-}
-
-//------------------------------------------------------------------------------
-
-inline bool Completer::getResult(DWORD& size)
-{
-    return overlapped!=0 && overlapped->getResult(size, overlappable.handle);
-}
-
-//------------------------------------------------------------------------------
-
-inline bool Completer::checkWaitedResult(bool& result)
-{
-    if (!isWaited()) {
-        return false;
-    }
-
-    DWORD size = 0;
-    result = getResult(size);
-
-    if (result) {
-        removeFromWaiter();
-        handleWaitedResult(size);
-    } else if (overlappable.failed()) {
-        removeFromWaiter();
-    }
-
-    return true;
-}
-
-//------------------------------------------------------------------------------
-
-inline const Failable& Completer::getFailable() const
-{
-    return overlappable;
-}
-
-//------------------------------------------------------------------------------
-
-inline Failable& Completer::getFailable()
-{
-    return overlappable;
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_WIN32_COMPLETER_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/Event.cc
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/Event.cc	(revision 6)
+++ 	(revision )
@@ -1,79 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "Event.h"
-
-#include "Waiter.h"
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::Event;
-
-//------------------------------------------------------------------------------
-
-bool Event::isFired() const
-{
-    DWORD result = WaitForSingleObject(handle, (waiter==0) ? INFINITE : 0);
-    if (result==WAIT_FAILED) {
-        eventFailable.setErrorCode(GetLastError());
-        return false;
-    } else if (result==WAIT_OBJECT_0) {
-        return true;
-    } else {
-        return false;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-void Event::addTo(Waiter& w)
-{
-    removeFromWaiter();
-    w.add(this);
-    waiter = &w;
-}
-
-//------------------------------------------------------------------------------
-
-void Event::removeFromWaiter()
-{
-    if (waiter!=0) {
-        waiter->remove(this);
-        waiter = 0;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/Event.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/Event.h	(revision 28)
+++ 	(revision )
@@ -1,209 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_WIN32_EVENT_H
-#define HU_VARADIISTVAN_SCPL_IO_WIN32_EVENT_H
-//------------------------------------------------------------------------------
-
-#include "EventFailable.h"
-
-#include <windows.h>
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-class Waiter;
-
-/**
- * Wrapper for an event.
- */
-class Event
-{
-private:
-    /**
-     * The object receiving the failure codes.
-     */
-    EventFailable& eventFailable;
-
-    /**
-     * The handle of the event.
-     */
-    HANDLE handle;
-
-    /**
-     * The object waiting for the event.
-     */
-    Waiter* waiter;
-
-public:
-    /**
-     * Construct the event.
-     */
-    Event(EventFailable& eventFailable);
-
-    /**
-     * Destroy the event. It will be removed from the waiter if it is
-     * in one.
-     */
-    ~Event();
-
-    /**
-     * Get the handle of the event.
-     */
-    HANDLE getHandle() const;
-
-    /**
-     * Get the waiter.
-     */
-    Waiter* getWaiter() const;
-
-    /**
-     * Register the event with the given waiter. If it is already
-     * registered with a waiter, it will be removed from that.
-     */
-    void addTo(Waiter& w);
-
-    /**
-     * Remove the object from the waiter it is registered with.
-     */
-    void removeFromWaiter();
-
-    /**
-     * Determine if the event is being waited for, i.e. it is
-     * associated with a waiter.
-     */
-    bool isWaited() const;
-
-    /**
-     * Set the event.
-     */
-    void fire();
-
-    /**
-     * Determine if the event is fired or not.
-     */
-    bool isFired() const;
-
-    /**
-     * Clear the event.
-     *
-     * @return if clearing succeeded.
-     */
-    bool clear();
-
-protected:
-    /**
-     * Set the error code on the failable object.
-     */
-    void setErrorCode(errorCode_t errorCode);
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline Event::Event(EventFailable& eventFailable) :
-    eventFailable(eventFailable),
-    handle(eventFailable.createEvent()),
-    waiter(0)
-{
-    if (handle==0) eventFailable.setErrorCode(GetLastError());
-}
-
-//------------------------------------------------------------------------------
-
-inline Event::~Event()
-{
-    removeFromWaiter();
-    eventFailable.destroyEvent(handle);
-}
-
-//------------------------------------------------------------------------------
-
-inline HANDLE Event::getHandle() const
-{
-    return handle;
-}
-
-//------------------------------------------------------------------------------
-
-inline Waiter* Event::getWaiter() const
-{
-    return waiter;
-}
-
-//------------------------------------------------------------------------------
-
-inline bool Event::isWaited() const
-{
-    return waiter!=0;
-}
-
-//------------------------------------------------------------------------------
-
-inline void Event::fire()
-{
-    if (!eventFailable.setEvent(handle)) {
-        eventFailable.setErrorCode(GetLastError());
-    }
-}
-
-//------------------------------------------------------------------------------
-
-inline bool Event::clear()
-{
-    if (!eventFailable.resetEvent(handle)) {
-        eventFailable.setErrorCode(GetLastError());
-        return false;
-    } else {
-        return true;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-inline void Event::setErrorCode(errorCode_t errorCode)
-{
-    eventFailable.setErrorCode(errorCode);
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_WIN32_EVENT_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/EventFactory.cc
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/EventFactory.cc	(revision 28)
+++ 	(revision )
@@ -1,72 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "EventFactory.h"
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::EventFactory;
-
-//------------------------------------------------------------------------------
-
-HANDLE EventFactory::createEvent()
-{
-    auto event = CreateEvent(0, true, false, 0);
-    return event;
-}
-
-//------------------------------------------------------------------------------
-
-bool EventFactory::setEvent(HANDLE handle)
-{
-    return SetEvent(handle);
-}
-
-//------------------------------------------------------------------------------
-
-bool EventFactory::resetEvent(HANDLE handle)
-{
-    return ResetEvent(handle);
-}
-
-//------------------------------------------------------------------------------
-
-void EventFactory::destroyEvent(HANDLE handle)
-{
-    CloseHandle(handle);
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/EventFactory.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/EventFactory.h	(revision 28)
+++ 	(revision )
@@ -1,92 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#pragma once
-
-//------------------------------------------------------------------------------
-
-#include <windows.h>
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * Base class for event factories. This one creates and handles standard
- * Windows events.
- */
-class EventFactory
-{
-public:
-    /**
-     * Virtual destructor.
-     */
-    virtual ~EventFactory() = default;
-
-    /**
-     * Create an event for this object.
-     *
-     * This default implementation calls CreateEvent().
-     */
-    virtual HANDLE createEvent();
-
-    /**
-     * Set the event represented by the given handle.
-     *
-     * This default implementation calls SetEvent().
-     */
-    virtual bool setEvent(HANDLE handle);
-
-    /**
-     * Set the event represented by the given handle.
-     *
-     * This default implementation calls ResetEvent().
-     */
-    virtual bool resetEvent(HANDLE handle);
-
-    /**
-     * Destroy the event represented by the given handle.
-     *
-     * This default implementation calls CloseHandle().
-     */
-    virtual void destroyEvent(HANDLE handle);
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/EventFailable.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/EventFailable.h	(revision 28)
+++ 	(revision )
@@ -1,140 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_WIN32_EVENTFAILABLE_H
-#define HU_VARADIISTVAN_SCPL_IO_WIN32_EVENTFAILABLE_H
-//------------------------------------------------------------------------------
-
-#include "../Failable.h"
-
-#include "EventFactory.h"
-
-#include <memory>
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-class Event;
-
-//------------------------------------------------------------------------------
-
-/**
- * A special subclass of Failable, the instances of which can be given
- * as a Failable target object to events. If some operation on an
- * event fails, the error code will be set on such an instance,
- * associated with the event.
- */
-class EventFailable : public Failable
-{
-protected:
-    /**
-     * The event factory for this object.
-     */
-    std::unique_ptr<EventFactory> eventFactory;
-
-protected:
-    /**
-     * Construct the object with the given event factory.
-     */
-    EventFailable(std::unique_ptr<EventFactory> eventFactory);
-
-    /**
-     * Create an event for this object using the event factory.
-     */
-    HANDLE createEvent();
-
-    /**
-     * Set the event represented by the given handle using the event factory.
-     */
-    bool setEvent(HANDLE handle);
-
-    /**
-     * Set the event represented by the given handle using the event factory.
-     */
-    bool resetEvent(HANDLE handle);
-
-    /**
-     * Destroy the event represented by the given handle using the event factory.
-     */
-    void destroyEvent(HANDLE handle);
-
-    friend class Event;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline EventFailable::EventFailable(std::unique_ptr<EventFactory> eventFactory) :
-    eventFactory(std::move(eventFactory))
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline HANDLE EventFailable::createEvent()
-{
-    return eventFactory->createEvent();
-}
-
-//------------------------------------------------------------------------------
-
-inline bool EventFailable::setEvent(HANDLE handle)
-{
-    return eventFactory->setEvent(handle);
-}
-
-//------------------------------------------------------------------------------
-
-inline bool EventFailable::resetEvent(HANDLE handle)
-{
-    return eventFactory->resetEvent(handle);
-}
-
-//------------------------------------------------------------------------------
-
-inline void EventFailable::destroyEvent(HANDLE handle)
-{
-    eventFactory->destroyEvent(handle);
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_WIN32_EVENTFAILABLE_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/LocalAcceptor.cc
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/LocalAcceptor.cc	(revision 29)
+++ 	(revision )
@@ -1,95 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "LocalAcceptor.h"
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::LocalAcceptor;
-
-using hu::varadiistvan::scpl::io::BufferedStream;
-
-//------------------------------------------------------------------------------
-
-LocalAcceptor::LocalAcceptor(LocalServerSocketBase* socket, const char* name) :
-    Completer(socket),
-    accepted(false)
-{
-    LocalSocket::setupPath(path, name);
-}
-
-//------------------------------------------------------------------------------
-
-bool LocalAcceptor::accept()
-{
-    if (failed()) return false;
-    if (accepted) return true;
-
-    bool result = false;
-    if (checkWaitedResult(result)) {
-        return result;
-    }
-
-    LocalServerSocketBase& socket = getServerSocket();
-    if (!socket.createNamedPipe(path)) {
-        return false;
-    }
-
-    result = socket.connectNamedPipe(overlapped);
-    if (result) {
-        accepted = true;
-    } else if (!socket.failed()) {
-        addTo(socket.waiter);
-    }
-
-    return result;
-}
-
-//------------------------------------------------------------------------------
-
-BufferedStream* LocalAcceptor::getAcceptedBufferedStream(Waiter* waiter)
-{
-    return (waiter==nullptr) ? getSocket() : getSocket(waiter);
-}
-
-//------------------------------------------------------------------------------
-
-void LocalAcceptor::handleWaitedResult(DWORD /*size*/)
-{
-    accepted = true;
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/LocalAcceptor.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/LocalAcceptor.h	(revision 29)
+++ 	(revision )
@@ -1,169 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_WIN32_LOCALACCEPTOR_H
-#define HU_VARADIISTVAN_SCPL_IO_WIN32_LOCALACCEPTOR_H
-//------------------------------------------------------------------------------
-
-#include "../BufferedStreamAcceptor.h"
-
-#include "Completer.h"
-
-#include "LocalServerSocketBase.h"
-#include "LocalSocket.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * Instances of this class are used to accept connection requests to a
- * local server socket, i.e. named pipe.
- */
-class LocalAcceptor : public Completer,
-                      public BufferedStreamAcceptor
-{
-private:
-    /**
-     * The path of the pipe to accept.
-     */
-    char path[256];
-
-    /**
-     * Indicate if the connection has been accepted.
-     */
-    bool accepted;
-
-protected:
-    /**
-     * Construct the acceptor.
-     */
-    LocalAcceptor(LocalServerSocketBase* socket, const char* name);
-
-    /**
-     * Get the socket.
-     *
-     * It returns the overlappable from the Completer part, knowing
-     * that it must be a LocalServerSocketBase.
-     */
-    LocalServerSocketBase& getServerSocket() const;
-
-public:
-    /**
-     * Try to accept a connection.
-     *
-     * If one is already accepted, but not retrieved yet, return true.
-     *
-     * If a new connection becomes immediately available, return true.
-     *
-     * If a new connection is not yet available, returns false.
-     *
-     * If some error occurs, the acceptor is marked failed and false
-     * is returned.
-     */
-    bool accept();
-
-    /**
-     * Get the local socket accepted last. If no socket was accepted,
-     * return 0. The local socket's waiter will be the given one.
-     */
-    LocalSocket* getSocket(Waiter* waiter,
-                           size_t readingCapacity = LocalSocket::DEFAULT_CAPACITY,
-                           size_t writingCapacity = LocalSocket::DEFAULT_CAPACITY);
-    /**
-     * Get the local socket accepted last. If no socket was accepted,
-     * return 0. The local socket's waiter will be the same as that of
-     * the associated server socket.
-     */
-    LocalSocket* getSocket(size_t readingCapacity = LocalSocket::DEFAULT_CAPACITY,
-                           size_t writingCapacity = LocalSocket::DEFAULT_CAPACITY);
-
-
-    /**
-     * Get the last accepted socket as a buffered stream with the given waiter,
-     * if any.
-     */
-    BufferedStream* getAcceptedBufferedStream(Waiter* waiter = nullptr) override;
-
-protected:
-    /**
-     * Set the indicator of an accepted connection to true.
-     *
-     * @see Completer::handleWaitedResult
-     */
-    virtual void handleWaitedResult(DWORD size);
-
-    friend class LocalServerSocket;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline LocalServerSocketBase& LocalAcceptor::getServerSocket() const
-{
-    return static_cast<LocalServerSocketBase&>(overlappable);
-}
-
-//------------------------------------------------------------------------------
-
-inline LocalSocket* LocalAcceptor::getSocket(Waiter* waiter,
-                                             size_t readingCapacity,
-                                             size_t writingCapacity)
-{
-    if (!accepted) return 0;
-
-    LocalSocket* s = new LocalSocket(waiter, overlappable.releaseHandle(),
-                                     readingCapacity, writingCapacity);
-    accepted = false;
-    return s;
-}
-
-//------------------------------------------------------------------------------
-
-inline LocalSocket* LocalAcceptor::getSocket(size_t readingCapacity,
-                                             size_t writingCapacity)
-{
-    return getSocket(overlappable.getWaiter(),
-                     readingCapacity, writingCapacity);
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_WIN32_LOCALACCEPTOR_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/LocalClientSocket.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/LocalClientSocket.h	(revision 9)
+++ 	(revision )
@@ -1,100 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_WIN32_LOCALCLIENTSOCKET_H
-#define HU_VARADIISTVAN_SCPL_IO_WIN32_LOCALCLIENTSOCKET_H
-//------------------------------------------------------------------------------
-
-#include "LocalConnector.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * A client socket that connects to a named server socket locally,
- * i.e. a named pipe.
- *
- * The server socket's name should be given. The name will be used as
- * described for LocalServerSocket.
- */
-class LocalClientSocket : public LocalSocket
-{
-private:
-    /**
-     * The local connector.
-     */
-    LocalConnector connector;
-
-public:
-    /**
-     * Construct the client socket with the given name.
-     */
-    LocalClientSocket(const char* name, Waiter* waiter = 0,
-                      size_t readingCapacity = DEFAULT_CAPACITY,
-                      size_t writingCapacity = DEFAULT_CAPACITY);
-
-    /**
-     * Get the connector.
-     */
-    LocalConnector& getConnector();
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline LocalClientSocket::LocalClientSocket(const char* name, Waiter* waiter,
-                                            size_t readingCapacity,
-                                            size_t writingCapacity) :
-    LocalSocket(waiter, 0, readingCapacity, writingCapacity),
-    connector(this, name)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline LocalConnector& LocalClientSocket::getConnector()
-{
-    return connector;
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_WIN32_LOCALCLIENTSOCKET_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/LocalConnector.cc
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/LocalConnector.cc	(revision 9)
+++ 	(revision )
@@ -1,58 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "LocalConnector.h"
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::LocalConnector;
-
-//------------------------------------------------------------------------------
-
-bool LocalConnector::connect()
-{
-    if (connected) return true;
-    if (failed()) return false;
-
-    if (socket.connect(path)) {
-        connected = true;
-        return true;
-    } else {
-        return false;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/LocalConnector.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/LocalConnector.h	(revision 9)
+++ 	(revision )
@@ -1,138 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_WIN32_LOCALCONNECTOR_H
-#define HU_VARADIISTVAN_SCPL_IO_WIN32_LOCALCONNECTOR_H
-//------------------------------------------------------------------------------
-
-#include "Completer.h"
-
-#include "LocalSocket.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * A connector that connects to a local server socket (i.e. named
- * pipe).
- */
-class LocalConnector : public FailableReference<LocalConnector>
-{
-private:
-    /**
-     * The local socket to connect on behalf of which we connect (it should
-     * actually be a LocalClientSocket).
-     */
-    LocalSocket& socket;
-
-    /**
-     * The path of the pipe to connect to.
-     */
-    char path[256];
-
-    /**
-     * Indicate if we are connected.
-     */
-    bool connected;
-
-protected:
-    /**
-     * Construct the connector.
-     */
-    LocalConnector(LocalSocket* socket, const char* name);
-
-public:
-    /**
-     * Connect to an address properly set up.
-     *
-     * If the connection succeeds immediately, it indicates success.
-     *
-     * If the connection does not succeed, because it would block, it
-     * sets up the socket to wait for the connection to succeed, and
-     * returns failure.
-     *
-     * If the connection fails for another reason, the error code is
-     * set, and false is returned.
-     */
-    bool connect();
-
-private:
-    /**
-     * Get the failable object.
-     */
-    const Failable& getFailable() const;
-
-    /**
-     * Get the failable object.
-     */
-    Failable& getFailable();
-
-    friend class FailableReference<LocalConnector>;
-    friend class LocalClientSocket;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline LocalConnector::LocalConnector(LocalSocket* socket, const char* name) :
-    socket(*socket),
-    connected(false)
-{
-    LocalSocket::setupPath(path, name);
-}
-
-//------------------------------------------------------------------------------
-
-inline const Failable& LocalConnector::getFailable() const
-{
-    return socket;
-}
-
-//------------------------------------------------------------------------------
-
-inline Failable& LocalConnector::getFailable()
-{
-    return socket;
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_WIN32_LOCALCONNECTOR_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/LocalServerSocket.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/LocalServerSocket.h	(revision 9)
+++ 	(revision )
@@ -1,97 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_WIN32_LOCALSERVERSOCKET_H
-#define HU_VARADIISTVAN_SCPL_IO_WIN32_LOCALSERVERSOCKET_H
-//------------------------------------------------------------------------------
-
-#include "LocalServerSocketBase.h"
-
-#include "LocalAcceptor.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * A server socket that works locally, i.e. a named pipe.
- *
- * It is identified by a name that should be unique for a user. The
- * actual pipe will be created with the name \\.\pipe\<name>.
- */
-class LocalServerSocket : public LocalServerSocketBase
-{
-private:
-    /**
-     * The acceptor to use.
-     */
-    LocalAcceptor acceptor;
-
-public:
-    /**
-     * Construct the socket.
-     */
-    LocalServerSocket(const char* name, Waiter* waiter = 0);
-
-    /**
-     * Get the acceptor.
-     */
-    LocalAcceptor& getAcceptor();
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline LocalServerSocket::LocalServerSocket(const char* name, Waiter* waiter) :
-    LocalServerSocketBase(waiter),
-    acceptor(this, name)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline LocalAcceptor& LocalServerSocket::getAcceptor()
-{
-    return acceptor;
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_WIN32_LOCALSERVERSOCKET_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/LocalServerSocketBase.cc
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/LocalServerSocketBase.cc	(revision 14)
+++ 	(revision )
@@ -1,84 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "LocalServerSocketBase.h"
-
-#include "LocalSocket.h"
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::LocalServerSocketBase;
-
-//------------------------------------------------------------------------------
-
-bool LocalServerSocketBase::createNamedPipe(const char* path)
-{
-    handle = CreateNamedPipe(path, PIPE_ACCESS_DUPLEX |
-                             ((waiter==0) ? 0 : FILE_FLAG_OVERLAPPED),
-                             PIPE_TYPE_BYTE | PIPE_READMODE_BYTE,
-                             PIPE_UNLIMITED_INSTANCES,
-                             BufferedStream::DEFAULT_CAPACITY,
-                             BufferedStream::DEFAULT_CAPACITY,
-                             0, 0);
-    if (handle==INVALID_HANDLE_VALUE) {
-        setErrorCode(GetLastError());
-    }
-    return handle!=0;
-}
-
-//------------------------------------------------------------------------------
-
-bool LocalServerSocketBase::connectNamedPipe(Overlapped* overlapped)
-{
-    if (overlapped!=0) overlapped->reset();
-    bool result = ConnectNamedPipe(handle,
-                                   (overlapped==0) ? 0 : overlapped->get());
-    DWORD error = GetLastError();
-    if (!result &&
-        (overlapped==0 ||
-         (error!=ERROR_IO_PENDING && error!=ERROR_IO_INCOMPLETE)))
-    {
-        setErrorCode(error);
-        return false;
-    } else if (overlapped==0) {
-        return result;
-    } else {
-        DWORD dummy = 0;
-        return overlapped->getResult(dummy, handle);
-    }
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/LocalServerSocketBase.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/LocalServerSocketBase.h	(revision 28)
+++ 	(revision )
@@ -1,100 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_WIN32_LOCALSERVERSOCKETBASE_H
-#define HU_VARADIISTVAN_SCPL_IO_WIN32_LOCALSERVERSOCKETBASE_H
-//------------------------------------------------------------------------------
-
-#include "Overlappable.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-class Overlapped;
-
-//------------------------------------------------------------------------------
-
-/**
- * Base class for a local server socket. This is here only to allow
- * for a more efficient implementation of LocalAcceptor.
- */
-class LocalServerSocketBase : public Overlappable
-{
-protected:
-    /**
-     * Construct the server socket base.
-     */
-    LocalServerSocketBase(Waiter* waiter);
-
-    /**
-     * Create a new named pipe with the proper settings. The handle of
-     * this object will be set to the created handle.
-     *
-     * @param path the path of the pipe to create. It should be the
-     * final path, not the user-given name.
-     *
-     * @return whether the pipe could be created
-     */
-    bool createNamedPipe(const char* path);
-
-    /**
-     * Connect the named pipe with the current handle of this object.
-     *
-     * @return whether the connection succeeded. If not, it may be a
-     * failure, which is then indicated, or it may be an overlapped
-     * operation which needs to wait.
-     */
-    bool connectNamedPipe(Overlapped* overlapped);
-
-    friend class LocalAcceptor;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline LocalServerSocketBase::LocalServerSocketBase(Waiter* waiter) :
-    Overlappable(std::make_unique<EventFactory>(), waiter)
-{
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_WIN32_LOCALSERVERSOCKETBASE_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/LocalSocket.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/LocalSocket.h	(revision 28)
+++ 	(revision )
@@ -1,122 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_WIN32_LOCALSOCKET_H
-#define HU_VARADIISTVAN_SCPL_IO_WIN32_LOCALSOCKET_H
-//------------------------------------------------------------------------------
-
-#include "BufferedStream.h"
-
-#include "Overlapped.h"
-
-#include <cstdio>
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * Basically a different name for a buffered stream.
- */
-class LocalSocket : public BufferedStream
-{
-public:
-    /**
-     * Create a concrete pipe path from the given user-specified name.
-     *
-     * @param dest the destination buffer, which should be at least
-     * 256 bytes long.
-     */
-    static void setupPath(char* dest, const char* name);
-
-protected:
-    /**
-     * Construct the local socket
-     */
-    LocalSocket(Waiter* waiter = 0, HANDLE handle = 0,
-                size_t readingCapacity = DEFAULT_CAPACITY,
-                size_t writingCapacity = DEFAULT_CAPACITY);
-
-
-protected:
-    /**
-     * Connect the client socket to the server.
-     */
-    bool connect(const char* path);
-
-    friend class LocalAcceptor;
-    friend class LocalConnector;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline void LocalSocket::setupPath(char* dest, const char* name)
-{
-    snprintf(dest, 256, "\\\\.\\pipe\\%s", name);
-}
-
-//------------------------------------------------------------------------------
-
-inline LocalSocket::LocalSocket(Waiter* waiter, HANDLE handle,
-                                size_t readingCapacity, size_t writingCapacity):
-    BufferedStream(std::make_unique<EventFactory>(),
-                   waiter, handle, readingCapacity, writingCapacity)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline bool LocalSocket::connect(const char* path)
-{
-    handle = CreateFile(path, GENERIC_READ|GENERIC_WRITE,
-                        0, 0, OPEN_EXISTING,
-                        FILE_FLAG_NO_BUFFERING | FILE_FLAG_OVERLAPPED, 0);
-
-    if (handle==INVALID_HANDLE_VALUE) {
-        setErrorCode(GetLastError());
-    }
-
-    return handle!=INVALID_HANDLE_VALUE;
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_WIN32_LOCALSOCKET_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/Makefile.am
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/Makefile.am	(revision 30)
+++ 	(revision )
@@ -1,53 +1,0 @@
-AM_CPPFLAGS = -I$(top_builddir)/src
-
-SUBDIRS=
-
-noinst_LTLIBRARIES=libvscpl_io_win32.la
-
-libvscpl_io_win32_la_SOURCES=\
-        Event.cc                \
-	EventFactory.cc		\
-        Overlapped.cc           \
-        Waiter.cc               \
-        BufferedStream.cc       \
-        ReadingBuffer.cc        \
-        WritingBuffer.cc        \
-	WSAInterface.cc		\
-        LocalConnector.cc       \
-        LocalAcceptor.cc        \
-        LocalServerSocketBase.cc \
-	SocketEventFactory.cc	\
-	TCPConnector.cc		\
-	TCPAcceptor.cc		\
-	TCPClientSocket.cc	\
-	TCPServerSocket.cc
-
-include_vscpl_io_win32dir=$(includedir)/hu/varadiistvan/scpl/io/_win32
-include_vscpl_io_win32_HEADERS=\
-	EventFactory.h		\
-        EventFailable.h         \
-        Overlappable.h          \
-        Event.h                 \
-        Overlapped.h            \
-        Waiter.h                \
-        WaitableEvent.h         \
-        BufferedStream.h        \
-        StreamBuffer.h          \
-        ReadingBuffer.h         \
-        WritingBuffer.h         \
-        Completer.h             \
-	WSAInterface.h		\
-	SocketEventFactory.h	\
-	SocketMixin.h		\
-        LocalSocket.h           \
-        LocalConnector.h        \
-        LocalClientSocket.h     \
-        LocalAcceptor.h         \
-        LocalServerSocketBase.h \
-        LocalServerSocket.h     \
-	TCPSocket.h		\
-	TCPConnector.h		\
-	TCPClientSocket.h	\
-	TCPAcceptor.h		\
-	TCPServerSocketBase.h   \
-	TCPServerSocket.h
Index: c/hu/varadiistvan/scpl/io/_win32/Overlappable.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/Overlappable.h	(revision 28)
+++ 	(revision )
@@ -1,149 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_WIN32_OVERLAPPABLE_H
-#define HU_VARADIISTVAN_SCPL_IO_WIN32_OVERLAPPABLE_H
-//------------------------------------------------------------------------------
-
-#include "EventFailable.h"
-
-#include <windows.h>
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-class Waiter;
-
-//------------------------------------------------------------------------------
-
-/**
- * Base class for classes that maintain a handle and may be subject to
- * overlapped I/O operations whose completion is waited for in a
- * Waiter.
- */
-class Overlappable : public EventFailable
-{
-protected:
-    /**
-     * The waiter to be used for waiting for events.
-     */
-    Waiter* waiter;
-
-    /**
-     * The handle to use.
-     */
-    HANDLE handle;
-
-protected:
-    /**
-     * Construct the object.
-     */
-    Overlappable(std::unique_ptr<EventFactory> eventFactory,
-                 Waiter* waiter = 0, HANDLE handle = 0);
-
-public:
-    /**
-     * Destroy the object.
-     */
-    virtual ~Overlappable();
-
-    /**
-     * Get the waiter.
-     */
-    Waiter* getWaiter();
-
-    /**
-     * Determine if the overlappable has a waiter.
-     */
-    bool hasWaiter() const;
-
-    /**
-     * Get the handle and clear it.
-     */
-    HANDLE releaseHandle();
-
-    friend class Completer;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline Overlappable::Overlappable(std::unique_ptr<EventFactory> eventFactory,
-                                  Waiter* waiter, HANDLE handle) :
-    EventFailable(std::move(eventFactory)),
-    waiter(waiter),
-    handle(handle)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline Overlappable::~Overlappable()
-{
-    if (handle!=0) CloseHandle(handle);
-}
-
-//------------------------------------------------------------------------------
-
-inline Waiter* Overlappable::getWaiter()
-{
-    return waiter;
-}
-
-//------------------------------------------------------------------------------
-
-inline bool Overlappable::hasWaiter() const
-{
-    return waiter != 0;
-}
-
-//------------------------------------------------------------------------------
-
-inline HANDLE Overlappable::releaseHandle()
-{
-    HANDLE h = handle;
-    handle = 0;
-    return h;
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_WIN32_OVERLAPPABLE_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/Overlapped.cc
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/Overlapped.cc	(revision 9)
+++ 	(revision )
@@ -1,66 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "Overlapped.h"
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::Overlapped;
-
-//------------------------------------------------------------------------------
-
-void Overlapped::reset()
-{
-    memset(&overlapped, 0, sizeof(overlapped));
-    overlapped.hEvent = getHandle();
-    clear();
-}
-
-//------------------------------------------------------------------------------
-
-bool Overlapped::getResult(DWORD& size, HANDLE file)
-{
-    bool result = GetOverlappedResult(file, &overlapped, &size, FALSE);
-    if (!result) {
-        DWORD error = GetLastError();
-        if (error!=ERROR_IO_PENDING && error!=ERROR_IO_INCOMPLETE) {
-            setErrorCode(error);
-        }
-    }
-    return result;
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/Overlapped.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/Overlapped.h	(revision 9)
+++ 	(revision )
@@ -1,129 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_WIN32_OVERLAPPED_H
-#define HU_VARADIISTVAN_SCPL_IO_WIN32_OVERLAPPED_H
-//------------------------------------------------------------------------------
-
-#include "Event.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * A wrapper for an OVERLAPPED structure which also has an event
- * associated with it. Instances of this class can be registered into and
- * unregistered from a Waiter. The destructor removes the object from
- * the waiter, if it is registered.
- */
-class Overlapped : public Event
-{
-private:
-    /**
-     * The Windows OVERLAPPED structure.
-     */
-    OVERLAPPED overlapped;
-
-public:
-    /**
-     * Construct the object. The overlapped structure will be reset to
-     * 0, and the event handle will be set.
-     */
-    Overlapped(EventFailable& eventFailable);
-
-    /**
-     * Reset the overlapped structure and set its event handle. The
-     * event is also cleared.
-     */
-    void reset();
-
-    /**
-     * Get the pointer to the overlapped structure.
-     */
-    OVERLAPPED* get();
-
-    /**
-     * Get the pointer to the overlapped structure.
-     */
-    const OVERLAPPED* get() const;
-
-    /**
-     * Get the result of the overlapped operation.
-     *
-     * If the operation has completed, the event will be cleared.
-     *
-     * @param size on successful return, it will contain the number of
-     * bytes read or written, which may be 0 for an end-of-file
-     * condition
-     * @param file the handle of the object on which the operation in
-     * question was performed
-     *
-     * @return true if the operation has completed, or false if it has
-     * not, or a failure has occured.
-     */
-    bool getResult(DWORD& size, HANDLE file);
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline Overlapped::Overlapped(EventFailable& eventFailable) :
-    Event(eventFailable)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline OVERLAPPED* Overlapped::get()
-{
-    return &overlapped;
-}
-
-//------------------------------------------------------------------------------
-
-inline const OVERLAPPED* Overlapped::get() const
-{
-    return &overlapped;
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_WIN32_OVERLAPPED_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/ReadingBuffer.cc
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/ReadingBuffer.cc	(revision 9)
+++ 	(revision )
@@ -1,77 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "ReadingBuffer.h"
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::ReadingBuffer;
-
-//------------------------------------------------------------------------------
-
-bool ReadingBuffer::read()
-{
-    if (failed()) return false;
-
-    if (getLength()>0) {
-        return true;
-    }
-
-    bool result = false;
-    if (checkWaitedResult(result)) {
-        return result;
-    }
-
-    BufferedStream& stream = getStream();
-    ssize_t numRead = stream.read(getData(), getCapacity(), overlapped);
-    if (numRead<0) {
-        if (!stream.failed()) {
-            addTo(stream.getWaiter());
-        }
-    } else {
-        addLength(numRead);
-    }
-    return numRead>=0;
-}
-
-//------------------------------------------------------------------------------
-
-void ReadingBuffer::handleWaitedResult(DWORD size)
-{
-    addLength(size);
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/ReadingBuffer.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/ReadingBuffer.h	(revision 9)
+++ 	(revision )
@@ -1,109 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_WIN32_READINGBUFFER_H
-#define HU_VARADIISTVAN_SCPL_IO_WIN32_READINGBUFFER_H
-//------------------------------------------------------------------------------
-
-#include "StreamBuffer.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * A buffer used for reading from a stream buffer.
- *
- * It should be made empty, and then the function read() should be
- * called on it. If it returns true, some data could be read. If the
- * amount of data in the buffer is then 0, that indicates and
- * end-of-file condition.
- */
-class ReadingBuffer : public StreamBuffer
-{
-protected:
-    /**
-     * Construct the buffer.
-     */
-    ReadingBuffer(size_t capacity, BufferedStream* stream);
-
-public:
-    /**
-     * Read into the buffer using the buffered stream if possible.
-     *
-     * If the buffer contains data, this function returns immediately
-     * with success, so the buffer should be reset before reading.
-     *
-     * If some data can be read immediately, that is stored in the
-     * buffer, and success is indicated. Success is indicated even if
-     * the amount of data read is 0, allowing for signalling the
-     * end-of-file or end-of-connection condition.
-     *
-     * If the reading operation would block, the stream is set up so
-     * that it would read, and failure is returned.
-     *
-     * Otherwise, if the reading operation fails for some other
-     * reason, the buffer's error code is set, so it should always be
-     * checked on a failure!
-     */
-    bool read();
-
-protected:
-    /**
-     * Set the buffer's length to the given value.
-     *
-     * @see Completer::handleWaitedResult
-     */
-    virtual void handleWaitedResult(DWORD size);
-
-    friend class BufferedStream;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline ReadingBuffer::ReadingBuffer(size_t capacity, BufferedStream* stream) :
-    StreamBuffer(capacity, stream)
-{
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_WIN32_READINGBUFFER_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/SocketEventFactory.cc
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/SocketEventFactory.cc	(revision 30)
+++ 	(revision )
@@ -1,74 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include <winsock2.h>
-
-#include "SocketEventFactory.h"
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::SocketEventFactory;
-
-//------------------------------------------------------------------------------
-
-HANDLE SocketEventFactory::createEvent()
-{
-    return WSACreateEvent();
-}
-
-//------------------------------------------------------------------------------
-
-bool SocketEventFactory::setEvent(HANDLE handle)
-{
-    return WSASetEvent(handle);
-}
-
-//------------------------------------------------------------------------------
-
-bool SocketEventFactory::resetEvent(HANDLE handle)
-{
-    return WSAResetEvent(handle);
-}
-
-//------------------------------------------------------------------------------
-
-void SocketEventFactory::destroyEvent(HANDLE handle)
-{
-    WSACloseEvent(handle);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/SocketEventFactory.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/SocketEventFactory.h	(revision 30)
+++ 	(revision )
@@ -1,79 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#pragma once
-
-//------------------------------------------------------------------------------
-
-#include "EventFactory.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * Event factory for socket events.
- */
-class SocketEventFactory : public EventFactory
-{
-public:
-    /**
-     * Create an event for this object by calling WSACreateEvent and then
-     * WSAEventSelect with the given network events.
-     */
-    HANDLE createEvent() override;
-
-    /**
-     * Set the event represented by the given handle by calling WSASetEvent().
-     */
-    bool setEvent(HANDLE handle) override;
-
-    /**
-     * Reset the event represented by the given handle by calling WSAResetEvent().
-     */
-    bool resetEvent(HANDLE handle) override;
-
-    /**
-     * Destroy the event represented by the given handle by calling WSACloseEvent().
-     */
-    void destroyEvent(HANDLE handle) override;
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/SocketMixin.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/SocketMixin.h	(revision 30)
+++ 	(revision )
@@ -1,99 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#pragma once
-
-//------------------------------------------------------------------------------
-
-#include "Event.h"
-
-#include "WSAInterface.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * A mixin for sockets with some commong functons
- */
-template <class Super>
-class SocketMixin : public Super
-{
-public:
-    using Super::Super;
-
-    /**
-     * Set the socket to non-blocking mode for the given events,
-     * if it has a waiter
-     */
-    bool setNonBlocking(Event& event, long eventMask);
-
-    /**
-     * Add the given event to our waiter, if any.
-     */
-    void addToWaiter(Event& event);
-};
-
-//------------------------------------------------------------------------------
-// Template definitions
-//------------------------------------------------------------------------------
-
-template <class Super>
-inline bool SocketMixin<Super>::setNonBlocking(Event& event, long eventMask)
-{
-    if (Super::waiter!=nullptr) {
-        return WSAInterface::get().eventSelect(Super::handle,
-                                               event.getHandle(), eventMask)==0;
-    } else {
-        return true;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-template <class Super>
-inline void SocketMixin<Super>::addToWaiter(Event& event)
-{
-    if (Super::waiter!=nullptr) {
-        event.addTo(*Super::waiter);
-    }
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/StreamBuffer.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/StreamBuffer.h	(revision 9)
+++ 	(revision )
@@ -1,93 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_WIN32_STREAMBUFFER_H
-#define HU_VARADIISTVAN_SCPL_IO_WIN32_STREAMBUFFER_H
-//------------------------------------------------------------------------------
-
-#include "../Buffer.h"
-#include "Completer.h"
-
-#include "BufferedStream.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * Base class for stream reading and writing buffers.
- */
-class StreamBuffer : public Buffer, public Completer
-{
-protected:
-    /**
-     * Construct the stream buffer with the given capacity and for the
-     * given stream.
-     */
-    StreamBuffer(size_t capacity, BufferedStream* stream);
-
-    /**
-     * Get the stream.
-     *
-     * This just casts the overlappable of the Completer part knowing
-     * that it must be a BufferedStream
-     */
-    BufferedStream& getStream() const;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline StreamBuffer::StreamBuffer(size_t capacity, BufferedStream* stream) :
-    Buffer(capacity),
-    Completer(stream)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline BufferedStream& StreamBuffer::getStream() const
-{
-    return static_cast<BufferedStream&>(overlappable);
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_WIN32_STREAMBUFFER_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/TCPAcceptor.cc
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/TCPAcceptor.cc	(revision 38)
+++ 	(revision )
@@ -1,89 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "TCPAcceptor.h"
-
-#include <cstdio>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::TCPAcceptor;
-using hu::varadiistvan::scpl::io::BufferedStream;
-
-//------------------------------------------------------------------------------
-
-bool TCPAcceptor::accept()
-{
-    if (failed()) return false;
-    if (acceptedSocket!=WSAInterface::get().getInvalidSocket()) return true;
-
-    bool result = false;
-    if (checkWaitedResult(result)) {
-        return result && !WSAInterface::get().isInvalidSocket(acceptedSocket);
-    }
-
-    handleWaitedResult(0);
-
-    return acceptedSocket!=WSAInterface::get().getInvalidSocket();
-}
-
-//------------------------------------------------------------------------------
-
-BufferedStream* TCPAcceptor::getAcceptedBufferedStream(Waiter* waiter)
-{
-    return (waiter==nullptr) ? getSocket() : getSocket(waiter);
-}
-
-//------------------------------------------------------------------------------
-
-void TCPAcceptor::handleWaitedResult(DWORD /*size*/)
-{
-    auto& socket = getServerSocket();
-    if (overlapped!=0) {
-        overlapped->reset();
-        socket.setNonBlocking(*overlapped, FD_ACCEPT);
-    }
-    acceptedSocket = socket.accept();
-    if (WSAInterface::get().isInvalidSocket(acceptedSocket) &&
-        !socket.failed())
-    {
-        if (overlapped!=0) {
-            socket.addToWaiter(*overlapped);
-        }
-    }
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/TCPAcceptor.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/TCPAcceptor.h	(revision 30)
+++ 	(revision )
@@ -1,174 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#pragma once
-
-//------------------------------------------------------------------------------
-
-#include "../BufferedStreamAcceptor.h"
-
-#include "Completer.h"
-
-#include "TCPServerSocketBase.h"
-#include "TCPSocket.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-class TCPServerSocket;
-
-//------------------------------------------------------------------------------
-
-/**
- * An acceptor that provides a TCPSocket for each accepted connection
- */
-class TCPAcceptor : public Completer,
-                    public BufferedStreamAcceptor
-{
-private:
-    /**
-     * The accepted socket.
-     */
-    HANDLE acceptedSocket;
-
-private:
-    /**
-     * Construct the acceptor.
-     */
-    TCPAcceptor(TCPServerSocketBase* socket);
-
-    /**
-     * Get the socket.
-     *
-     * It returns the overlappable from the Completer part, knowing
-     * that it must be a TCPServerSocket.
-     */
-    TCPServerSocketBase& getServerSocket() const;
-
-public:
-    /**
-     * Try to accept a connection.
-     *
-     * If one is already accepted, but not retrieved yet, return true.
-     *
-     * If a new connection becomes immediately available, return true.
-     *
-     * If a new connection is not yet available, returns false.
-     *
-     * If some error occurs, the acceptor is marked failed and false
-     * is returned.
-     */
-    bool accept();
-
-    /**
-     * Get the TCP socket accepted last. If no socket was accepted,
-     * return 0. The TCP socket's waiter will be the given one
-     * (which can be 0).
-     */
-    TCPSocket* getSocket(Waiter* waiter,
-                         size_t readingCapacity = TCPSocket::DEFAULT_CAPACITY,
-                         size_t writingCapacity = TCPSocket::DEFAULT_CAPACITY);
-    /**
-     * Get the TCP socket accepted last. If no socket was accepted,
-     * return 0. The TCP socket's waiter will be the same as that of
-     * the associated server socket.
-     */
-    TCPSocket* getSocket(size_t readingCapacity = TCPSocket::DEFAULT_CAPACITY,
-                         size_t writingCapacity = TCPSocket::DEFAULT_CAPACITY);
-
-    /**
-     * Get the last accepted socket as a buffered stream with the given waiter,
-     * if any.
-     */
-    BufferedStream* getAcceptedBufferedStream(Waiter* waiter = nullptr) override;
-
-protected:
-    /**
-     * Set the indicator of an accepted connection to true.
-     *
-     * @see Completer::handleWaitedResult
-     */
-    void handleWaitedResult(DWORD size) override;
-
-    friend class TCPServerSocket;
-};
-
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline TCPAcceptor::TCPAcceptor(TCPServerSocketBase* socket) :
-    Completer(socket),
-    acceptedSocket(WSAInterface::get().getInvalidSocket())
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline TCPServerSocketBase& TCPAcceptor::getServerSocket() const
-{
-    return static_cast<TCPServerSocketBase&>(overlappable);
-}
-
-//------------------------------------------------------------------------------
-
-inline TCPSocket* TCPAcceptor::getSocket(Waiter* waiter,
-                                         size_t readingCapacity,
-                                         size_t writingCapacity)
-{
-    if (acceptedSocket==WSAInterface::get().getInvalidSocket()) return 0;
-
-    TCPSocket* socket = new TCPSocket(acceptedSocket, waiter,
-                                      readingCapacity, writingCapacity);
-    acceptedSocket = WSAInterface::get().getInvalidSocket();
-    return socket;
-}
-
-//------------------------------------------------------------------------------
-
-inline TCPSocket* TCPAcceptor::getSocket(size_t readingCapacity,
-                                         size_t writingCapacity)
-{
-    return getSocket(overlappable.getWaiter(), readingCapacity, writingCapacity);
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/TCPClientSocket.cc
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/TCPClientSocket.cc	(revision 30)
+++ 	(revision )
@@ -1,66 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "TCPClientSocket.h"
-
-#include "WSAInterface.h"
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::TCPClientSocket;
-
-//------------------------------------------------------------------------------
-
-struct in_addr TCPClientSocket::str2address(const char* addressStr)
-{
-    struct in_addr address;
-    address.s_addr = inet_addr(addressStr);
-    return address;
-}
-
-//------------------------------------------------------------------------------
-
-TCPClientSocket::TCPClientSocket(struct in_addr address, unsigned short port,
-                                 Waiter* waiter,
-                                 size_t readingCapacity,
-                                 size_t writingCapacity) :
-    TCPSocket(WSAInterface::get().socket(AF_INET, SOCK_STREAM, 0), waiter,
-              readingCapacity, writingCapacity),
-    connector(this, address, port)
-{
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/TCPClientSocket.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/TCPClientSocket.h	(revision 30)
+++ 	(revision )
@@ -1,128 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#pragma once
-
-//------------------------------------------------------------------------------
-
-#include "TCPConnector.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * Client socket that connects to a TCP server socket.
- *
- * The server socket's address and port should be given.
- */
-class TCPClientSocket : public TCPSocket
-{
-public:
-    /**
-     * Convert the given string to an address
-     */
-    static struct in_addr str2address(const char* addressStr);
-
-private:
-    /**
-     * The address to use for connecting.
-     */
-    TCPConnector connector;
-
-public:
-    /**
-     * Construct the client socket with the given address and port.
-     *
-     * @param waiter the waiter to use for waiting a possible event
-     * occuring on the socket. If given, the socket will be
-     * non-blocking. Otherwise, it will be blocking, and the connect()
-     * function of the Connector might block as well as the reading
-     * and writing buffers.
-     */
-    TCPClientSocket(struct in_addr address, unsigned short port,
-                    Waiter* waiter = 0,
-                    size_t readingCapacity = DEFAULT_CAPACITY,
-                    size_t writingCapacity = DEFAULT_CAPACITY);
-
-    /**
-     * Construct the client socket with the given address and port.
-     *
-     * @param waiter the waiter to use for waiting a possible event
-     * occuring on the socket. If given, the socket will be
-     * non-blocking. Otherwise, it will be blocking, and the connect()
-     * function of the Connector might block as well as the reading
-     * and writing buffers.
-     */
-    TCPClientSocket(const char* address, unsigned short port,
-                    Waiter* waiter = 0,
-                    size_t readingCapacity = DEFAULT_CAPACITY,
-                    size_t writingCapacity = DEFAULT_CAPACITY);
-
-    /**
-     * Get the connector for this client.
-     */
-    TCPConnector& getConnector();
-
-    friend class TCPConnector;
-};
-
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline TCPClientSocket::TCPClientSocket(const char* address, unsigned short port,
-                                        Waiter* waiter,
-                                        size_t readingCapacity,
-                                        size_t writingCapacity) :
-    TCPClientSocket(str2address(address), port, waiter,
-                    readingCapacity, writingCapacity)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline TCPConnector& TCPClientSocket::getConnector()
-{
-    return connector;
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/TCPConnector.cc
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/TCPConnector.cc	(revision 30)
+++ 	(revision )
@@ -1,82 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "TCPConnector.h"
-
-#include <cstdio>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::TCPConnector;
-
-//------------------------------------------------------------------------------
-
-bool TCPConnector::connect()
-{
-    if (connected) return true;
-    if (failed()) return false;
-
-    bool result = false;
-    if (checkWaitedResult(result)) {
-        return result;
-    }
-
-    if (overlapped!=0) {
-        overlapped->reset();
-        socket.setNonBlocking(*overlapped, FD_CONNECT|FD_CLOSE);
-    }
-
-    if (socket.connect(address)) {
-        connected = true;
-        return true;
-    } else {
-        if (!socket.failed()) {
-            if (overlapped!=0) {
-                socket.addToWaiter(*overlapped);
-            }
-        }
-        return false;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-void TCPConnector::handleWaitedResult(DWORD size)
-{
-    connected = true;
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/TCPConnector.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/TCPConnector.h	(revision 30)
+++ 	(revision )
@@ -1,123 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#pragma once
-
-//------------------------------------------------------------------------------
-
-#include "Completer.h"
-
-#include "TCPSocket.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * The connector class used by the TCP client socket.
- */
-class TCPConnector : public Completer
-{
-private:
-    /**
-     * The local socket to connect on behalf of which we connect.
-     */
-    TCPSocket& socket;
-
-    /**
-     * The socket address to connect to.
-     */
-    struct sockaddr_in address;
-
-    /**
-     * Indicate if we are connected.
-     */
-    bool connected;
-
-    /**
-     * Indicate if we are connecting.
-     */
-    bool connecting;
-
-protected:
-    /**
-     * Create the connector for the given TCP client socket.
-     */
-    TCPConnector(TCPSocket* socket,
-                 struct in_addr address, unsigned short port);
-
-public:
-    /**
-     * Connect to an address properly set up.
-     *
-     * If the connection succeeds immediately, it indicates success.
-     *
-     * If the connection does not succeed, because it would block, it
-     * sets up the socket to wait for the connection to succeed, and
-     * returns failure.
-     *
-     * If the connection fails for another reason, the error code is
-     * set, and false is returned.
-     */
-    bool connect();
-
-private:
-
-    void handleWaitedResult(DWORD size) override;
-
-    friend class FailableReference<TCPConnector>;
-    friend class TCPClientSocket;
-};
-
-//------------------------------------------------------------------------------
-
-inline TCPConnector::TCPConnector(TCPSocket* socket,
-                                  struct in_addr address, unsigned short port) :
-    Completer(socket),
-    socket(*socket),
-    connected(false),
-    connecting(false)
-{
-    this->address.sin_family = AF_INET;
-    this->address.sin_addr = address;
-    this->address.sin_port = htons(port);
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/TCPServerSocket.cc
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/TCPServerSocket.cc	(revision 39)
+++ 	(revision )
@@ -1,80 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "WSAInterface.h"
-#include "TCPServerSocket.h"
-
-#include <cstdio>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::TCPServerSocket;
-
-//------------------------------------------------------------------------------
-
-TCPServerSocket::TCPServerSocket(unsigned short port, Waiter* waiter) :
-    TCPServerSocketBase(waiter,
-                        reinterpret_cast<HANDLE>(WSAInterface::get().socket(AF_INET, SOCK_STREAM, 0))),
-    acceptor(this)
-{
-    struct sockaddr_in sin;
-    sin.sin_family = AF_INET;
-    sin.sin_addr.s_addr = INADDR_ANY;
-    sin.sin_port = htons(port);
-
-    int reuse = 1;
-    if (WSAInterface::get().setsockopt(handle, SOL_SOCKET, SO_REUSEADDR,
-                                       reinterpret_cast<const char*>(&reuse),
-                                       sizeof(reuse))<0) {
-        printf("TCPServerSocket: setsockopt(SO_REUSEADDR) failed\n");
-    }
-
-    if (WSAInterface::get().bind(handle,
-                                 reinterpret_cast<struct sockaddr*>(&sin), sizeof(sin))<0) {
-        printf("TCPServerSocket: bind failed\n");
-        setErrorCode(GetLastError());
-        return;
-    }
-
-    if (WSAInterface::get().listen(handle)<0) {
-        printf("TCPServerSocket: listen failed\n");
-        setErrorCode(GetLastError());
-        return;
-    }
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/TCPServerSocket.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/TCPServerSocket.h	(revision 30)
+++ 	(revision )
@@ -1,93 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#pragma once
-
-//------------------------------------------------------------------------------
-
-#include "TCPServerSocketBase.h"
-
-#include "TCPAcceptor.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * A server socket that provides a TCP access point.
- */
-class TCPServerSocket : public TCPServerSocketBase
-{
-private:
-    /**
-     * The acceptor to use for accepting connections
-     */
-    TCPAcceptor acceptor;
-
-public:
-    /**
-     * Construct the server socket to listen at the given port.
-     *
-     * @param port the number of the port to listen at
-     * @param waiter the waiter to use for waiting a possible event
-     * occuring on the socket. If given, the socket will be
-     * non-blocking. Otherwise, it will be blocking, and the accept()
-     * function of the Acceptor might block.
-     */
-    TCPServerSocket(unsigned short port, Waiter* waiter = nullptr);
-
-    /**
-     * Get the acceptor.
-     */
-    TCPAcceptor& getAcceptor();
-
-    friend class TCPAcceptor;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline TCPAcceptor& TCPServerSocket::getAcceptor()
-{
-    return acceptor;
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/TCPServerSocketBase.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/TCPServerSocketBase.h	(revision 30)
+++ 	(revision )
@@ -1,110 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#pragma once
-
-//------------------------------------------------------------------------------
-
-#include "Overlappable.h"
-#include "SocketMixin.h"
-#include "SocketEventFactory.h"
-#include "Event.h"
-
-#include <cstdio>
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-class Overlapped;
-
-//------------------------------------------------------------------------------
-
-/**
- * A server socket that provides a TCP access point. This is here only to allow
- * for a more efficient implementation of TCPAcceptor.
- */
-class TCPServerSocketBase : public SocketMixin<Overlappable>
-{
-public:
-    /**
-     * Construct the server socket to listen at the given port.
-     *
-     * @param port the number of the port to listen at
-     * @param waiter the waiter to use for waiting a possible event
-     * occuring on the socket. If given, the socket will be
-     * non-blocking. Otherwise, it will be blocking, and the accept()
-     * function of the Acceptor might block.
-     */
-    TCPServerSocketBase(Waiter* waiter, HANDLE handle = 0);
-
-    /**
-     * Accept an incoming connection if possible.
-     */
-    HANDLE accept();
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline TCPServerSocketBase::TCPServerSocketBase(Waiter* waiter,
-                                                HANDLE handle) :
-    SocketMixin<Overlappable>(std::make_unique<SocketEventFactory>(),
-                              waiter, handle)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline HANDLE TCPServerSocketBase::accept()
-{
-    auto a = WSAInterface::get().accept(handle);
-    if (WSAInterface::get().isInvalidSocket(a)) {
-        auto lastError = GetLastError();
-        if (lastError!=WSAEWOULDBLOCK && lastError!=WSAEINPROGRESS) {
-            setErrorCode(lastError);
-        }
-    }
-
-    return a;
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/TCPSocket.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/TCPSocket.h	(revision 30)
+++ 	(revision )
@@ -1,141 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#pragma once
-
-//------------------------------------------------------------------------------
-
-#include "WSAInterface.h"
-
-#include "BufferedStream.h"
-#include "SocketMixin.h"
-#include "SocketEventFactory.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * A socket that works on a TCP connection.
- */
-class TCPSocket : public SocketMixin<BufferedStream>
-{
-protected:
-    /**
-     * Construct the TCP socket.
-     */
-    TCPSocket(Waiter* waiter = 0, int protocol = 0,
-              size_t readingCapacity = DEFAULT_CAPACITY,
-              size_t writingCapacity = DEFAULT_CAPACITY);
-
-    /**
-     * Construct the socket with the given parameters.
-     */
-    TCPSocket(HANDLE s, Waiter* waiter = 0,
-              size_t readingCapacity = DEFAULT_CAPACITY,
-              size_t writingCapacity = DEFAULT_CAPACITY);
-
-public:
-    /**
-     * Destroy the socket by closing the file descriptor
-     */
-    ~TCPSocket();
-
-protected:
-    /**
-     * Connect the client socket to the server.
-     */
-    bool connect(const struct sockaddr_in& sin);
-
-    friend class TCPAcceptor;
-    friend class TCPConnector;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline TCPSocket::TCPSocket(Waiter* waiter, int protocol,
-                            size_t readingCapacity,
-                            size_t writingCapacity) :
-    TCPSocket(WSAInterface::get().socket(AF_INET, SOCK_STREAM, protocol),
-              waiter, readingCapacity, writingCapacity)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline TCPSocket::TCPSocket(HANDLE s, Waiter* waiter,
-                            size_t readingCapacity,
-                            size_t writingCapacity) :
-    SocketMixin<BufferedStream>(std::make_unique<SocketEventFactory>(),
-                                waiter, s,
-                                readingCapacity, writingCapacity)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline TCPSocket::~TCPSocket()
-{
-    if (!WSAInterface::get().isInvalidSocket(handle)) {
-        WSAInterface::get().closesocket(handle);
-    }
-}
-
-
-//------------------------------------------------------------------------------
-
-inline bool TCPSocket::connect(const struct sockaddr_in& sin)
-{
-    auto a = WSAInterface::get().connect(handle,
-                                         reinterpret_cast<const struct sockaddr*>(&sin),
-                                         sizeof(sin));
-    if (a==SOCKET_ERROR) {
-        auto lastError = GetLastError();
-        if (lastError!=WSAEWOULDBLOCK && lastError!=WSAEINPROGRESS) {
-            setErrorCode(lastError);
-        }
-    }
-
-    return a!=SOCKET_ERROR;
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/WSAInterface.cc
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/WSAInterface.cc	(revision 39)
+++ 	(revision )
@@ -1,134 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include <winsock2.h>
-
-#include "WSAInterface.h"
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::WSAInterface;
-
-//------------------------------------------------------------------------------
-
-WSAInterface::WSAInterface()
-{
-    WSADATA wsaData;
-    WSAStartup(MAKEWORD(2, 2), &wsaData);
-}
-
-//------------------------------------------------------------------------------
-
-WSAInterface::~WSAInterface()
-{
-    WSACleanup();
-}
-
-//------------------------------------------------------------------------------
-
-HANDLE WSAInterface::getInvalidSocket()
-{
-    return reinterpret_cast<HANDLE>(INVALID_SOCKET);
-}
-
-//------------------------------------------------------------------------------
-
-bool WSAInterface::isInvalidSocket(HANDLE handle)
-{
-    return handle==reinterpret_cast<HANDLE>(INVALID_SOCKET);
-}
-
-//------------------------------------------------------------------------------
-
-HANDLE WSAInterface::socket(int af, int type, int protocol)
-{
-    return reinterpret_cast<HANDLE>(::socket(af, type, protocol));
-}
-
-//------------------------------------------------------------------------------
-
-int WSAInterface::eventSelect(HANDLE socket, HANDLE event, long eventMask)
-{
-    return WSAEventSelect(reinterpret_cast<SOCKET>(socket),
-                          event, eventMask);
-}
-
-//------------------------------------------------------------------------------
-
-int WSAInterface::setsockopt(HANDLE socket, int level, int optname,
-                             const char* optval, int optlen)
-{
-    return ::setsockopt(reinterpret_cast<SOCKET>(socket), level, optname,
-                        optval, optlen);
-}
-
-//------------------------------------------------------------------------------
-
-int WSAInterface::bind(HANDLE socket, const struct sockaddr* name, int namelen)
-{
-    return ::bind(reinterpret_cast<SOCKET>(socket), name, namelen);
-}
-
-//------------------------------------------------------------------------------
-
-int WSAInterface::listen(HANDLE socket, int backlog)
-{
-    return ::listen(reinterpret_cast<SOCKET>(socket), backlog);
-}
-
-//------------------------------------------------------------------------------
-
-HANDLE WSAInterface::accept(HANDLE socket, struct sockaddr* addr, int* addrlen)
-{
-    return reinterpret_cast<HANDLE>(::accept(reinterpret_cast<SOCKET>(socket),
-                                             addr, addrlen));
-}
-
-//------------------------------------------------------------------------------
-
-int WSAInterface::connect(HANDLE socket, const struct sockaddr* name, int namelen)
-{
-    return ::connect(reinterpret_cast<SOCKET>(socket), name, namelen);
-}
-
-//------------------------------------------------------------------------------
-
-int WSAInterface::closesocket(HANDLE socket)
-{
-    return ::closesocket(reinterpret_cast<SOCKET>(socket));
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/WSAInterface.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/WSAInterface.h	(revision 39)
+++ 	(revision )
@@ -1,140 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#pragma once
-
-//------------------------------------------------------------------------------
-
-#include <windows.h>
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * An object to access the WSA functions through it. It is a singleton, and its
- * constructor initializes the WSA subsystem, while its destructor cleans it
- * up.
- */
-class WSAInterface
-{
-public:
-    /**
-     * Get the only instance of this class
-     */
-    static WSAInterface& get();
-
-private:
-    /**
-     * Construct the interface.
-     */
-    WSAInterface();
-
-    /**
-     * Destroy the interface.
-     */
-    ~WSAInterface();
-
-public:
-    /**
-     * Get the invalid socket handle as a HANDLE.
-     */
-    HANDLE getInvalidSocket();
-
-    /**
-     * Determine if the given handle represents an invalid socket.
-     */
-    bool isInvalidSocket(HANDLE handle);
-
-    /**
-     * Create a socket.
-     */
-    HANDLE socket(int af, int type, int protocol);
-
-    /**
-     * Set the given socket into non-blocking mode and make the given event to
-     * be triggered by the events in the given event mask
-     */
-    int eventSelect(HANDLE socket, HANDLE event, long eventMask);
-
-    /**
-     * Set a socket option
-     */
-    int setsockopt(HANDLE socket, int level, int optname,
-                   const char* optval, int optlen);
-
-    /**
-     * Bind the given socket handle to the given address.
-     */
-    int bind(HANDLE socket, const struct sockaddr* name, int namelen);
-
-    /**
-     * Start listening on the given socket.
-     */
-    int listen(HANDLE socket, int backlog = 5);
-
-    /**
-     * Accept a socket on the given server socket.
-     */
-    HANDLE accept(HANDLE socket,
-                  struct sockaddr* addr = nullptr, int* addrlen = nullptr);
-
-    /**
-     * Try to connect to the given address using the given socket.
-     */
-    int connect(HANDLE socket, const struct sockaddr* name, int namelen);
-
-    /**
-     * Close the givern socket.
-     */
-    int closesocket(HANDLE socket);
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline WSAInterface& WSAInterface::get()
-{
-    static WSAInterface wsa;
-    return wsa;
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/WaitableEvent.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/WaitableEvent.h	(revision 28)
+++ 	(revision )
@@ -1,92 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_WIN32_WAITABLEEVENT_H
-#define HU_VARADIISTVAN_SCPL_IO_WIN32_WAITABLEEVENT_H
-//------------------------------------------------------------------------------
-
-#include "Event.h"
-#include "EventFailable.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-/**
- * An event which can be waited for.
- */
-class WaitableEvent : public EventFailable, public Event
-{
-public:
-    /**
-     * Construct the event.
-     */
-    WaitableEvent(Waiter* waiter = 0);
-
-    /**
-     * Check if the event is fired or not. If so, the fired status
-     * will be cleared.
-     */
-    bool check();
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline WaitableEvent::WaitableEvent(Waiter* waiter) :
-    EventFailable(std::make_unique<EventFactory>()),
-    Event(static_cast<EventFailable&>(*this))
-{
-    if (waiter!=0) addTo(*waiter);
-}
-
-//------------------------------------------------------------------------------
-
-inline bool WaitableEvent::check()
-{
-    if (isFired()) {
-        clear();
-        return true;
-    } else {
-        return false;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_WIN32_WAITABLEEVENT_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/Waiter.cc
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/Waiter.cc	(revision 6)
+++ 	(revision )
@@ -1,79 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "Waiter.h"
-
-#include "Event.h"
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::Waiter;
-
-//------------------------------------------------------------------------------
-
-Waiter::~Waiter()
-{
-    while(!events.empty()) {
-        Event* event = *events.begin();
-        event->removeFromWaiter();
-    }
-}
-
-//------------------------------------------------------------------------------
-
-bool Waiter::wait(int timeout)
-{
-    if (numEvents==0) return true;
-
-    HANDLE handles[numEvents];
-    size_t j = 0;
-    for(events_t::const_iterator i = events.begin();
-        i!=events.end(); ++i, ++j)
-    {
-        handles[j] = (*i)->getHandle();
-    }
-
-    DWORD result = WaitForMultipleObjects(numEvents, handles, false,
-                                          (timeout<0) ? INFINITE : timeout);
-    if (result==WAIT_FAILED) {
-        setErrorCode(GetLastError());
-        return false;
-    } else {
-        return result!=WAIT_TIMEOUT;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/Waiter.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/Waiter.h	(revision 6)
+++ 	(revision )
@@ -1,140 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_WIN32_WAITER_H
-#define HU_VARADIISTVAN_SCPL_IO_WIN32_WAITER_H
-//------------------------------------------------------------------------------
-
-#include "../Failable.h"
-
-#include <set>
-
-#include <cassert>
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-class Event;
-
-/**
- * Class that can be used to register OVERLAPPED structures and then
- * wait for their events.
- */
-class Waiter : public Failable
-{
-private:
-    /**
-     * Type for the mapping of events to overlapped objects.
-     */
-    typedef std::set<Event*> events_t;
-
-    /**
-     * The events to be handled.
-     */
-    events_t events;
-
-    /**
-     * The number of events.
-     */
-    size_t numEvents;
-
-public:
-    /**
-     * Construct the waiter.
-     */
-    Waiter();
-
-    /**
-     * Destroy the waiter. It will be removed from any Event
-     * objects it may be related to.
-     */
-    ~Waiter();
-
-    /**
-     * Wait for an event to occur with the given timeout.
-     *
-     * @return true if any of the events belonging to the Overlapped
-     * objects become ready, false if the timeout occurs.
-     */
-    bool wait(int timeout = -1);
-
-protected:
-    /**
-     * Add the given event to the set of those to be waited for.
-     */
-    void add(Event* event);
-
-    /**
-     * Remove the given event from the set of those to be waited for.
-     */
-    void remove(Event* event);
-
-    friend class Event;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline Waiter::Waiter() :
-    numEvents(0)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline void Waiter::add(Event* event)
-{
-    events.insert(event);
-    ++numEvents;
-}
-
-//------------------------------------------------------------------------------
-
-inline void Waiter::remove(Event* event)
-{
-    assert(numEvents>0);
-    --numEvents;
-    events.erase(event);
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_WIN32_WAITER_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/WritingBuffer.cc
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/WritingBuffer.cc	(revision 9)
+++ 	(revision )
@@ -1,76 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "WritingBuffer.h"
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::WritingBuffer;
-
-//------------------------------------------------------------------------------
-
-bool WritingBuffer::write()
-{
-    if (failed()) return false;
-
-    if (getLength()==0) {
-        return true;
-    }
-
-    bool result;
-    if (checkWaitedResult(result)) {
-        return result;
-    }
-
-    BufferedStream& stream = getStream();
-    result = stream.write(getData(), getLength(), overlapped);
-    if (result) {
-        reset();
-    } else if (!stream.failed()) {
-        addTo(stream.getWaiter());
-    }
-
-    return result;
-}
-
-//------------------------------------------------------------------------------
-
-void WritingBuffer::handleWaitedResult(DWORD /*size*/)
-{
-    reset();
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/_win32/WritingBuffer.h
===================================================================
--- src/hu/varadiistvan/scpl/io/_win32/WritingBuffer.h	(revision 9)
+++ 	(revision )
@@ -1,109 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_WIN32_WRITINGBUFFER_H
-#define HU_VARADIISTVAN_SCPL_IO_WIN32_WRITINGBUFFER_H
-//------------------------------------------------------------------------------
-
-#include "StreamBuffer.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-/**
- * A buffer used for writing into a buffered stream.
- *
- * The data to write should be stored in the buffer. Then write()
- * should be called. If it returns true, it indicates that all data
- * has been written. In that case the buffer is automatically emptied.
- */
-class WritingBuffer : public StreamBuffer
-{
-protected:
-    /**
-     * Construct the buffer.
-     */
-    WritingBuffer(size_t capacity, BufferedStream* stream);
-
-public:
-    /**
-     * Write the contents of the buffer using the associated buffered
-     * stream.
-     *
-     * If the buffer is empty, the function returns indicating
-     * success.
-     *
-     * If the complete remaining contents could be written, it also indicates
-     * success, and the buffer is reset, ready to be used again.
-     *
-     * If not everything can be written and the write operation
-     * indicates that it would block, this function returns failure
-     * after the stream has been set up  to handle the corresponding
-     * poll events.
-     *
-     * Otherwise, if the writing operation fails for some other
-     * reason, the buffer's error code is set to the error's code and
-     * false is returned.
-     */
-    bool write();
-
-protected:
-    /**
-     * Reset the buffer to signify that its contents have been written.
-     *
-     * @see Completer::handleWaitedResult
-     */
-    virtual void handleWaitedResult(DWORD size);
-
-    friend class BufferedStream;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline WritingBuffer::WritingBuffer(size_t capacity, BufferedStream* stream) :
-    StreamBuffer(capacity, stream)
-{
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_IO_WIN32_WRITINGBUFFER_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/hu/varadiistvan/scpl/io/hgccwrapper
===================================================================
--- src/hu/varadiistvan/scpl/io/hgccwrapper	(revision 6)
+++ 	(revision )
@@ -1,96 +1,0 @@
-#!/bin/sh
-
-# Create a skeleton of a wrapper header for a certain class
-
-classname=$1
-uppername=`echo ${classname} | tr a-z A-Z`
-
-cat > "${classname}.h" <<EOF
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_IO_${uppername}_H
-#define HU_VARADIISTVAN_SCPL_IO_${uppername}_H
-//------------------------------------------------------------------------------
-
-#if 0 // The public interface of ${classname}
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-//------------------------------------------------------------------------------
-
-class ${classname}
-{
-public:
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-#endif // 0, The public interface of ${classname}
-
-//------------------------------------------------------------------------------
-
-#include "hu/varadiistvan/scpl/config.h"
-
-//------------------------------------------------------------------------------
-
-#if TARGET_API_POSIX
-
-#include "_posix/${classname}.h"
-
-//------------------------------------------------------------------------------
-
-#elif TARGET_API_WIN32 || TARGET_API_WIN64
-
-#include "_win32/${classname}.h"
-
-//------------------------------------------------------------------------------
-
-#else
-
-#error "Not implemented for this target!"
-
-#endif
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_${uppername}_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
-EOF
-
-hg add "${classname}.h"
Index: c/hu/varadiistvan/scpl/types.h
===================================================================
--- src/hu/varadiistvan/scpl/types.h	(revision 6)
+++ 	(revision )
@@ -1,80 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_SCPL_TYPES_H
-#define HU_VARADIISTVAN_SCPL_TYPES_H
-//------------------------------------------------------------------------------
-
-#include "hu/varadiistvan/scpl/config.h"
-
-#if TARGET_API_WIN32
-#include <windows.h>
-#endif
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl {
-
-//------------------------------------------------------------------------------
-
-#if TARGET_API_WIN32 || TARGET_API_WIN64
-
-//------------------------------------------------------------------------------
-
-typedef DWORD errorCode_t;
-static const DWORD XPL_NO_ERROR = 0;
-
-//------------------------------------------------------------------------------
-
-#elif TARGET_API_POSIX
-
-//------------------------------------------------------------------------------
-
-typedef int errorCode_t;
-static const int XPL_NO_ERROR = 0;
-
-//------------------------------------------------------------------------------
-
-#else
-
-#error "Not implemented for this target!"
-
-#endif
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_SCPL_TYPES_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: st/.copyright
===================================================================
--- test/.copyright	(revision 2)
+++ 	(revision )
@@ -1,23 +1,0 @@
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
Index: st/.srcmessage
===================================================================
--- test/.srcmessage	(revision 2)
+++ 	(revision )
@@ -1,1 +1,0 @@
-// This file is part of VSCPL, a simple cross-platform utility library
Index: st/Makefile.am
===================================================================
--- test/Makefile.am	(revision 37)
+++ 	(revision )
@@ -1,35 +1,0 @@
-AM_CPPFLAGS=-I$(top_srcdir)/src -I$(top_builddir)/src
-
-noinst_PROGRAMS=testthread testmutex testcondvar testevent testlocsock testtcpsock testblkstream testmultiserver testmulticlient
-
-if TARGET_API_POSIX
-noinst_PROGRAMS+=testrandom
-endif
-
-LDADD=../src/hu/varadiistvan/scpl/libvscpl.la
-if TARGET_API_POSIX
-LDADD+=-lpthread
-endif
-if TARGET_API_WIN32
-AM_LDFLAGS=-static -static-libgcc -static-libstdc++
-endif
-
-testthread_SOURCES=testthread.cc
-
-testmutex_SOURCES=testmutex.cc
-
-testcondvar_SOURCES=testcondvar.cc
-
-testevent_SOURCES=testevent.cc
-
-testlocsock_SOURCES=testlocsock.cc
-
-testtcpsock_SOURCES=testtcpsock.cc
-
-testblkstream_SOURCES=testblkstream.cc
-
-testrandom_SOURCES=testrandom.cc
-
-testmultiserver_SOURCES=testmultiserver.cc
-
-testmulticlient_SOURCES=testmulticlient.cc
Index: st/testblkstream.cc
===================================================================
--- test/testblkstream.cc	(revision 10)
+++ 	(revision )
@@ -1,341 +1,0 @@
-// Copyright (c) 2012 by István Váradi
-
-// This file is part of libxplcommon, a common utility library for
-// development related to X-Plane
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include <hu/varadiistvan/scpl/io/Waiter.h>
-#include <hu/varadiistvan/scpl/io/LocalServerSocket.h>
-#include <hu/varadiistvan/scpl/io/LocalAcceptor.h>
-#include <hu/varadiistvan/scpl/io/LocalSocket.h>
-#include <hu/varadiistvan/scpl/io/LocalClientSocket.h>
-#include <hu/varadiistvan/scpl/io/LocalConnector.h>
-#include <hu/varadiistvan/scpl/io/DataStream.h>
-#include <hu/varadiistvan/scpl/io/WaitableEvent.h>
-
-#include <hu/varadiistvan/scpl/Thread.h>
-#include <hu/varadiistvan/scpl/PseudoRandom.h>
-
-#include <cstdlib>
-#include <cstdio>
-#include <cassert>
-
-#include <signal.h>
-
-#include <sys/time.h>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::Waiter;
-using hu::varadiistvan::scpl::io::LocalServerSocket;
-using hu::varadiistvan::scpl::io::LocalAcceptor;
-using hu::varadiistvan::scpl::io::LocalSocket;
-using hu::varadiistvan::scpl::io::LocalClientSocket;
-using hu::varadiistvan::scpl::io::LocalConnector;
-using hu::varadiistvan::scpl::io::BufferedStream;
-using hu::varadiistvan::scpl::io::DataStream;
-
-using hu::varadiistvan::scpl::Thread;
-using hu::varadiistvan::scpl::PseudoRandom;
-
-using std::min;
-
-//------------------------------------------------------------------------------
-
-class TestThread : public Thread
-{
-private:
-    static const uint8_t OP_ADD = 1;
-
-    static const uint8_t OP_SUB = 2;
-
-    static const uint8_t OP_MUL = 3;
-
-    static const uint8_t OP_DIV = 4;
-
-private:
-    static int32_t perform(int32_t value, uint8_t operation, int32_t x);
-
-    DataStream* dataStream;
-
-protected:
-    TestThread();
-
-public:
-    void interrupt();
-
-protected:
-    void communicate(BufferedStream& stream, unsigned seed, bool isClient);
-};
-
-//------------------------------------------------------------------------------
-
-inline int32_t TestThread::perform(int32_t value, uint8_t operation, int32_t x)
-{
-    switch (operation) {
-      case OP_ADD:
-        return value + x;
-      case OP_SUB:
-        return value - x;
-      case OP_MUL:
-        return value * x;
-      case OP_DIV:
-        return value / x;
-      default:
-        return value;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-inline TestThread::TestThread() :
-    dataStream(0)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline void TestThread::interrupt()
-{
-    if (dataStream!=0) dataStream->interrupt();
-}
-
-//------------------------------------------------------------------------------
-
-void TestThread::communicate(BufferedStream& stream, unsigned seed, bool isClient)
-{
-    static const size_t reportInterval = 100000;
-
-    const char* prefix = isClient ? "Client" : "Server";
-
-    dataStream = new DataStream(stream);
-    PseudoRandom random(seed);
-
-    bool first = true;
-
-    size_t numRequests = 0;
-    size_t nextReportRequests = reportInterval;
-
-    int32_t value = 0;
-    if (isClient) {
-        value = random.next();
-        dataStream->writeS32(value);
-    } else {
-        value = dataStream->readS32();
-    }
-
-    int32_t newValue = value;
-
-    while(*dataStream) {
-        if (!first || isClient) {
-            unsigned numOperations = random.nextUnsigned(20, 1);
-            dataStream->writeU16(numOperations);
-            //printf("%s: numOperations=%u\n", prefix, numOperations);
-            for(unsigned i = 0; i<numOperations; ++i) {
-                double r = random.nextDouble();
-                uint8_t operation =
-                    (r<0.4) ? OP_ADD : ((r<0.8) ? OP_SUB :
-                                        ((r<0.98) ? OP_MUL : OP_DIV));
-                int32_t x = random.next();
-
-                dataStream->writeU8(operation);
-                dataStream->writeS32(x);
-
-                newValue = perform(newValue, operation, x);
-            }
-            if (!dataStream->flush()) break;
-
-            if (isClient) {
-                value = newValue;
-                ++numRequests;
-                if (numRequests>=nextReportRequests) {
-                    printf("%s: after %lu requests, value=%d\n",
-                           prefix, static_cast<unsigned long>(numRequests),
-                           value);
-                    nextReportRequests += reportInterval;
-                }
-            }
-        }
-
-        unsigned numOperations = dataStream->readU16();
-        for (unsigned i = 0; *dataStream && i<numOperations; ++i) {
-            uint8_t operation = dataStream->readU8();
-            int32_t x = dataStream->readS32();
-            newValue = perform(newValue, operation, x);
-        }
-
-        if (*dataStream) {
-            if (!isClient) {
-                value = newValue;
-                ++numRequests;
-                if (numRequests>=nextReportRequests) {
-                    printf("%s: after %lu requests, value=%d\n",
-                           prefix, static_cast<unsigned long>(numRequests),
-                           value);
-                    nextReportRequests += reportInterval;
-                }
-            }
-        }
-
-
-        first = false;
-    }
-
-    if (dataStream->failed()) {
-        printf("%s: data stream failed with error code: %lu\n", prefix,
-               static_cast<unsigned long>(dataStream->getErrorCode()));
-    } else if (dataStream->isInterrupted()) {
-        printf("%s: data stream was interrupted\n", prefix);
-    }
-
-    printf("%s: value=%d, %lu requests\n", prefix, value,
-           static_cast<unsigned long>(numRequests));
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-class ServerThread : public TestThread
-{
-public:
-    virtual void run();
-};
-
-//------------------------------------------------------------------------------
-
-void ServerThread::run()
-{
-    Waiter waiter;
-
-    unsigned seed = static_cast<unsigned>(time(0)*1.2);
-    printf("ServerThread::run: seed=%u\n", seed);
-
-    LocalServerSocket serverSocket("test", &waiter);
-    LocalAcceptor& acceptor = serverSocket.getAcceptor();
-
-    while(!acceptor.accept()) {
-        if (acceptor.failed()) {
-            printf("ServerThread::run: acceptor failed...: %lu\n",
-                   (unsigned long)acceptor.getErrorCode());
-            return;
-        }
-        printf("ServerThread::run: waiting...\n");
-        waiter.wait();
-    }
-
-    printf("ServerThread::run: waiting done, received connection\n");
-    LocalSocket* socket = acceptor.getSocket();
-
-    acceptor.accept();
-
-    communicate(*socket, seed, false);
-
-    delete socket;
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-class ClientThread : public TestThread
-{
-public:
-    virtual void run();
-};
-
-//------------------------------------------------------------------------------
-
-void ClientThread::run()
-{
-    Waiter waiter;
-
-    unsigned seed = static_cast<unsigned>(time(0)*1.8);
-    printf("ClientThread::run: seed=%u\n", seed);
-
-    printf("ClientThread::run: sleeping\n");
-    sleep(500);
-    printf("ClientThread::run: connecting\n");
-
-    LocalClientSocket socket("test", &waiter);
-
-    LocalConnector& connector = socket.getConnector();
-
-    while(!connector.connect()) {
-        if (connector.failed()) {
-            printf("ClientThread::run: connector failed...\n");
-            return;
-        }
-        printf("ClientThread::run: waiting...\n");
-        waiter.wait();
-    }
-
-    printf("ClientThread::run: connected\n");
-
-    communicate(socket, seed, true);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-int main()
-{
-#if TARGET_API_POSIX
-    signal(SIGPIPE, SIG_IGN);
-#endif
-
-    ServerThread serverThread;
-    ClientThread clientThread;
-
-    printf("Starting threads\n");
-    serverThread.start();
-    clientThread.start();
-
-
-    Thread::sleep(60000);
-    //Thread::sleep(1000);
-    printf("Signalling the client thread\n");
-    //serverThread.interrupt();
-    clientThread.interrupt();
-    printf("Signalled the client thread\n");
-
-    printf("Waiting for the client thread\n");
-    clientThread.join();
-    printf("Waiting for the server thread\n");
-    serverThread.join();
-    printf("Both threads returned\n");
-
-    return 0;
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: st/testcondvar.cc
===================================================================
--- test/testcondvar.cc	(revision 5)
+++ 	(revision )
@@ -1,184 +1,0 @@
-// Copyright (c) 2012 by István Váradi
-
-// This file is part of libxplcommon, a common utility library for
-// development related to X-Plane
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include <hu/varadiistvan/scpl/Thread.h>
-#include <hu/varadiistvan/scpl/Mutex.h>
-#include <hu/varadiistvan/scpl/CondVar.h>
-
-#include <cstdlib>
-#include <cstdio>
-#include <cassert>
-
-#include <signal.h>
-
-#include <sys/time.h>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::Thread;
-using hu::varadiistvan::scpl::Mutex;
-using hu::varadiistvan::scpl::CondVar;
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-class Thread1 : public Thread
-{
-private:
-    char id;
-
-    Mutex& mutex;
-
-    CondVar& condVar;
-
-public:
-    Thread1(char id, Mutex& mutex, CondVar& condVar);
-
-    virtual void run();
-};
-
-//------------------------------------------------------------------------------
-
-inline Thread1::Thread1(char id, Mutex& mutex, CondVar& condVar) :
-    id(id),
-    mutex(mutex),
-    condVar(condVar)
-{
-}
-
-//------------------------------------------------------------------------------
-
-void Thread1::run()
-{
-    printf("Thread1[%c]::run: locking, and waiting on the condition\n", id);
-    mutex.lock();
-    condVar.wait(mutex);
-    printf("Thread1[%c]::run: condition received, waiting again\n", id);
-    condVar.wait(mutex);
-    printf("Thread1[%c]::run: condition received again, waiting with timeout\n", id);
-
-    bool result = condVar.wait(mutex, 5000);
-    printf("Thread1[%c]::run: waiting finished, %s\n", id,
-           result ? "received condition" : "timed out");
-    mutex.unlock();
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-class Thread2 : public Thread
-{
-private:
-    Mutex& mutex;
-
-    CondVar& condVar;
-
-public:
-    Thread2(Mutex& mutex, CondVar& condVar);
-
-    virtual void run();
-};
-
-//------------------------------------------------------------------------------
-
-inline Thread2::Thread2(Mutex& mutex, CondVar& condVar) :
-    mutex(mutex),
-    condVar(condVar)
-{
-}
-
-//------------------------------------------------------------------------------
-
-void Thread2::run()
-{
-    printf("Thread2::run: sleeping\n");
-    sleep(2000);
-    printf("------------------------------------------------------------\n");
-
-    printf("Thread2::run: woke up, signalling condition variable\n");
-    condVar.signal();
-
-    printf("Thread2::run: sleeping...\n");
-    sleep(2000);
-    printf("------------------------------------------------------------\n");
-
-    printf("Thread2::run: woke up, broadcasting condition variable\n");
-    condVar.broadcast();
-
-    printf("Thread2::run: sleeping...\n");
-    sleep(2000);
-    printf("------------------------------------------------------------\n");
-
-    printf("Thread2::run: woke up, signalling condition variable\n");
-    condVar.signal();
-
-    printf("Thread2::run: sleeping...\n");
-    sleep(2000);
-    printf("------------------------------------------------------------\n");
-
-    printf("Thread2::run: woke up, signalling condition variable\n");
-    condVar.signal();
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-int main()
-{
-    Mutex mutex;
-    CondVar condVar;
-
-    Thread1 thread1('A', mutex, condVar);
-    Thread1 thread1a('B', mutex, condVar);
-    Thread2 thread2(mutex, condVar);
-
-    printf("Starting threads\n");
-    thread1.start();
-    thread1a.start();
-    thread2.start();
-
-    printf("Waiting for thread1\n");
-    thread1.join();
-    thread1a.join();
-    printf("Waiting for thread2\n");
-    thread2.join();
-    printf("Both threads returned\n");
-
-    return 0;
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: st/testevent.cc
===================================================================
--- test/testevent.cc	(revision 7)
+++ 	(revision )
@@ -1,194 +1,0 @@
-// Copyright (c) 2012 by István Váradi
-
-// This file is part of libxplcommon, a common utility library for
-// development related to X-Plane
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include <hu/varadiistvan/scpl/io/Waiter.h>
-#include <hu/varadiistvan/scpl/io/WaitableEvent.h>
-
-#include <hu/varadiistvan/scpl/Thread.h>
-
-#include <cstdio>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::Thread;
-using hu::varadiistvan::scpl::io::Waiter;
-using hu::varadiistvan::scpl::io::WaitableEvent;
-
-//------------------------------------------------------------------------------
-
-class ServerThread : public Thread
-{
-private:
-    Waiter waiter;
-
-    WaitableEvent event;
-
-public:
-    ServerThread();
-
-    WaitableEvent& getEvent();
-
-    virtual void run();
-};
-
-//------------------------------------------------------------------------------
-
-inline ServerThread::ServerThread() :
-    event(&waiter)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline WaitableEvent& ServerThread::getEvent()
-{
-    return event;
-}
-
-//------------------------------------------------------------------------------
-
-void ServerThread::run()
-{
-    printf("ServerThread::run\n");
-    while(!event.check()) {
-        printf("ServerThread::run: waiting...\n");
-        waiter.wait();
-        printf("ServerThread::run: waiting done\n");
-    }
-    printf("ServerThread::run: finished\n");
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-class BlockingServerThread : public Thread
-{
-private:
-    WaitableEvent event;
-
-public:
-    WaitableEvent& getEvent();
-
-    virtual void run();
-};
-
-//------------------------------------------------------------------------------
-
-inline WaitableEvent& BlockingServerThread::getEvent()
-{
-    return event;
-}
-
-//------------------------------------------------------------------------------
-
-void BlockingServerThread::run()
-{
-    printf("BlockingServerThread::run: waiting...\n");
-    if (event.check()) {
-        printf("BlockingServerThread::run: waiting done\n");
-    } else {
-        printf("BlockingServerThread::run: waiting failed\n");
-    }
-    printf("BlockingServerThread::run: finished\n");
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-class ClientThread : public Thread
-{
-private:
-    WaitableEvent& event;
-
-public:
-    ClientThread(WaitableEvent& event);
-
-    virtual void run();
-};
-
-//------------------------------------------------------------------------------
-
-inline ClientThread::ClientThread(WaitableEvent& event) :
-    event(event)
-{
-}
-
-//------------------------------------------------------------------------------
-
-void ClientThread::run()
-{
-    printf("ClientThread::run: sleeping\n");
-    sleep(2000);
-    printf("ClientThread::run: firing event\n");
-    event.fire();
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-template <class Server> void runTest()
-{
-    Server serverThread;
-    ClientThread clientThread(serverThread.getEvent());
-
-    printf("Starting threads\n");
-    serverThread.start();
-    clientThread.start();
-
-    printf("Waiting for the client thread\n");
-    clientThread.join();
-    printf("Waiting for the server thread\n");
-    serverThread.join();
-    printf("Both threads returned\n");
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-int main()
-{
-    printf("Running the event test with a non-blocking WaitableEvent\n\n");
-    runTest<ServerThread>();
-
-    printf("\n\nRunning the event test with a blocking WaitableEvent\n\n");
-    runTest<BlockingServerThread>();
-
-    return 0;
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: st/testlocsock.cc
===================================================================
--- test/testlocsock.cc	(revision 8)
+++ 	(revision )
@@ -1,407 +1,0 @@
-// Copyright (c) 2012 by István Váradi
-
-// This file is part of libxplcommon, a common utility library for
-// development related to X-Plane
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include <hu/varadiistvan/scpl/io/Waiter.h>
-#include <hu/varadiistvan/scpl/io/LocalServerSocket.h>
-#include <hu/varadiistvan/scpl/io/LocalAcceptor.h>
-#include <hu/varadiistvan/scpl/io/LocalSocket.h>
-#include <hu/varadiistvan/scpl/io/LocalClientSocket.h>
-#include <hu/varadiistvan/scpl/io/LocalConnector.h>
-#include <hu/varadiistvan/scpl/io/ReadingBuffer.h>
-#include <hu/varadiistvan/scpl/io/WritingBuffer.h>
-#include <hu/varadiistvan/scpl/io/WaitableEvent.h>
-
-#include <hu/varadiistvan/scpl/Thread.h>
-#include <hu/varadiistvan/scpl/PseudoRandom.h>
-
-#include <cstdlib>
-#include <cstdio>
-#include <cassert>
-
-#include <signal.h>
-
-#include <sys/time.h>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::Waiter;
-using hu::varadiistvan::scpl::io::LocalServerSocket;
-using hu::varadiistvan::scpl::io::LocalAcceptor;
-using hu::varadiistvan::scpl::io::LocalSocket;
-using hu::varadiistvan::scpl::io::LocalClientSocket;
-using hu::varadiistvan::scpl::io::LocalConnector;
-using hu::varadiistvan::scpl::io::ReadingBuffer;
-using hu::varadiistvan::scpl::io::WritingBuffer;
-using hu::varadiistvan::scpl::io::WaitableEvent;
-
-using hu::varadiistvan::scpl::Thread;
-using hu::varadiistvan::scpl::PseudoRandom;
-
-using std::min;
-
-//------------------------------------------------------------------------------
-
-void communicate(ReadingBuffer* readingBuffer, WritingBuffer* writingBuffer,
-                 Waiter& waiter, unsigned seed, const char* prefix,
-                 WaitableEvent* quitEvent = 0)
-{
-    static const size_t minToWrite = 2076;
-    static const size_t maxToWrite = 1345670;
-
-    static const size_t reportingInterval = 10000;
-
-    static const int sleepThreshold = static_cast<int>(PseudoRandom::MAX * 0.99);
-    static const int sleepRemainder = PseudoRandom::MAX - sleepThreshold;
-    static const unsigned minSleep = 10;
-    static const unsigned maxSleep = 250;
-    static const unsigned sleepRange = maxSleep - minSleep;
-
-    size_t numBytesRead = 0;
-    size_t nextReportRead = reportingInterval;
-    size_t numWriteBlocked = 0;
-    size_t numBytesWritten = 0;
-    size_t nextReportWritten = reportingInterval;
-    size_t numReadBlocked = 0;
-    size_t numMillisSlept = 0;
-
-    bool toQuit = false;
-
-    PseudoRandom random(seed);
-    while(!toQuit) {
-        size_t toWrite = random.nextUnsigned(maxToWrite, minToWrite);
-
-        size_t lastWriteLength = 0;
-        if (writingBuffer!=0) {
-            lastWriteLength = min(writingBuffer->getCapacity(), toWrite);
-            writingBuffer->reset();
-            writingBuffer->addLength(lastWriteLength);
-        }
-
-        while(toWrite>0) {
-            if (quitEvent!=0 && quitEvent->check()) {
-                toQuit = true;
-                break;
-            }
-
-            bool hasPending = false;
-
-            if (writingBuffer!=0) {
-                size_t loopCount = 0;
-                while(toWrite>0) {
-                    ++loopCount;
-                    if (writingBuffer->write()) {
-                        numBytesWritten += lastWriteLength;
-                        toWrite -= lastWriteLength;
-
-                        if (numBytesWritten>=nextReportWritten) {
-                            printf("%s: written %lu bytes with %lu blocking and %lu ms sleeping\n",
-                                   prefix,
-                                   static_cast<unsigned long>(numBytesWritten),
-                                   static_cast<unsigned long>(numWriteBlocked),
-                                   static_cast<unsigned long>(numMillisSlept));
-                            nextReportWritten += reportingInterval;
-                        }
-
-                        if (toWrite>0) {
-                            if (quitEvent!=0 && quitEvent->check()) {
-                                toQuit = true;
-                                break;
-                            } else {
-                                lastWriteLength = min(writingBuffer->getCapacity(), toWrite);
-                                writingBuffer->addLength(lastWriteLength);
-                                if (loopCount>10) {
-                                    break;
-                                }
-                            }
-                        }
-                    } else if (writingBuffer->failed()) {
-                        printf("%s: writing failed with error: %lu\n",
-                               prefix,
-                               static_cast<unsigned long>(writingBuffer->getErrorCode()));
-                        toQuit = true;
-                        break;
-                    } else {
-                        ++numWriteBlocked;
-                        hasPending = true;
-                        break;
-                    }
-                }
-                if (toQuit) break;
-            }
-
-            if (readingBuffer!=0) {
-                size_t loopCount = 0;
-                while(true) {
-                    ++loopCount;
-                    if (readingBuffer->read()) {
-                        size_t l = readingBuffer->getLength();
-                        if (l==0) {
-                            printf("%s: reading encountered end of file\n", prefix);
-                            toQuit = true;
-                            break;
-                        }
-                        numBytesRead += l;
-                        if (numBytesRead>=nextReportRead) {
-                            printf("%s: read %lu bytes with %lu blocking and %lu ms sleeping\n",
-                                   prefix,
-                                   static_cast<unsigned long>(numBytesRead),
-                                   static_cast<unsigned long>(numReadBlocked),
-                                   static_cast<unsigned long>(numMillisSlept));
-                            nextReportRead += reportingInterval;
-                        }
-                        readingBuffer->reset();
-                        if (quitEvent!=0 && quitEvent->check()) {
-                            toQuit = true;
-                            break;
-                        } else if (loopCount>10) {
-                            break;
-                        }
-                    } else if (readingBuffer->failed()) {
-                        printf("%s: reading failed with error: %lu\n",
-                               prefix,
-                               static_cast<unsigned long>(readingBuffer->getErrorCode()));
-                        toQuit = true;
-                        break;
-                    } else {
-                        ++numReadBlocked;
-                        hasPending = true;
-                        break;
-                    }
-                }
-                if (toQuit) break;
-            }
-
-            int r = random.next();
-            if (r>=sleepThreshold) {
-                unsigned toSleep = minSleep +
-                    static_cast<unsigned>(static_cast<double>(r - sleepThreshold) *
-                                          sleepRange / sleepRemainder);
-                assert(toSleep>=minSleep);
-                assert(toSleep<maxSleep);
-                Thread::sleep(toSleep);
-                numMillisSlept += toSleep;
-            }
-
-            if (toWrite>0 && hasPending) {
-                waiter.wait();
-                if (waiter.failed()) {
-                    printf("%s: waiting failed with error: %lu\n",
-                           prefix,
-                           static_cast<unsigned long>(waiter.getErrorCode()));
-                    toQuit = true;
-                    break;
-                }
-            }
-        }
-    }
-
-    printf("%s: written %lu bytes with %lu blocking\n",
-           prefix,
-           static_cast<unsigned long>(numBytesWritten),
-           static_cast<unsigned long>(numWriteBlocked));
-    printf("%s: read %lu bytes with %lu blocking\n",
-           prefix,
-           static_cast<unsigned long>(numBytesRead),
-           static_cast<unsigned long>(numReadBlocked));
-    printf("%s: slept %lu ms\n", prefix,
-           static_cast<unsigned long>(numMillisSlept));
-}
-
-//------------------------------------------------------------------------------
-
-class ServerThread : public Thread
-{
-private:
-    Waiter waiter;
-
-    WaitableEvent event;
-
-public:
-    ServerThread();
-
-    void signal();
-
-    virtual void run();
-};
-
-//------------------------------------------------------------------------------
-
-ServerThread::ServerThread() :
-    event(&waiter)
-{
-}
-
-//------------------------------------------------------------------------------
-
-void ServerThread::signal()
-{
-    event.fire();
-}
-
-//------------------------------------------------------------------------------
-
-void ServerThread::run()
-{
-    unsigned seed = static_cast<unsigned>(time(0)*1.2);
-    printf("ServerThread::run: seed=%u\n", seed);
-
-    LocalServerSocket serverSocket("test", &waiter);
-    LocalAcceptor& acceptor = serverSocket.getAcceptor();
-
-    bool eventFired = false;
-    while(!acceptor.accept()) {
-        eventFired = event.check();
-        if (eventFired) break;
-        if (acceptor.failed()) {
-            printf("ServerThread::run: acceptor failed...: %lu\n",
-                   (unsigned long)acceptor.getErrorCode());
-            return;
-        }
-        printf("ServerThread::run: waiting...\n");
-        waiter.wait();
-    }
-
-    if (eventFired) {
-        printf("ServerThread::run: waiting done, quitting\n");
-        return;
-    }
-
-    printf("ServerThread::run: waiting done, received connection\n");
-    LocalSocket* socket = acceptor.getSocket();
-
-    communicate(&socket->getReadingBuffer(), &socket->getWritingBuffer(),
-                waiter, seed, "ServerThread", &event);
-
-
-    delete socket;
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-class ClientThread : public Thread
-{
-private:
-    Waiter waiter;
-
-    WaitableEvent event;
-
-public:
-    ClientThread();
-
-    void signal();
-
-    virtual void run();
-};
-
-//------------------------------------------------------------------------------
-
-ClientThread::ClientThread() :
-    event(&waiter)
-{
-}
-
-//------------------------------------------------------------------------------
-
-void ClientThread::signal()
-{
-    event.fire();
-}
-
-//------------------------------------------------------------------------------
-
-void ClientThread::run()
-{
-    unsigned seed = static_cast<unsigned>(time(0)*1.8);
-    printf("ClientThread::run: seed=%u\n", seed);
-
-    printf("ClientThread::run: sleeping\n");
-    sleep(500);
-    printf("ClientThread::run: connecting\n");
-
-    LocalClientSocket socket("test", &waiter);
-
-    LocalConnector& connector = socket.getConnector();
-
-    while(!connector.connect()) {
-        if (connector.failed()) {
-            printf("ClientThread::run: connector failed...\n");
-            return;
-        }
-        printf("ClientThread::run: waiting...\n");
-        waiter.wait();
-    }
-
-    printf("ClientThread::run: connected\n");
-
-    communicate(&socket.getReadingBuffer(), &socket.getWritingBuffer(),
-                waiter, seed, "ClientThread", &event);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-int main()
-{
-#if TARGET_API_POSIX
-    signal(SIGPIPE, SIG_IGN);
-#endif
-
-    ServerThread serverThread;
-    ClientThread clientThread;
-
-    printf("Starting threads\n");
-    serverThread.start();
-    clientThread.start();
-
-    Thread::sleep(60000);
-    //Thread::sleep(5000);
-    printf("Signalling the server thread\n");
-    //serverThread.signal();
-    clientThread.signal();
-    printf("Signalled the server thread\n");
-
-    printf("Waiting for the client thread\n");
-    clientThread.join();
-    printf("Waiting for the server thread\n");
-    serverThread.join();
-    printf("Both threads returned\n");
-
-    return 0;
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: st/testmulticlient.cc
===================================================================
--- test/testmulticlient.cc	(revision 14)
+++ 	(revision )
@@ -1,74 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include <hu/varadiistvan/scpl/io/Waiter.h>
-#include <hu/varadiistvan/scpl/io/LocalClientSocket.h>
-#include <hu/varadiistvan/scpl/io/LocalConnector.h>
-#include <hu/varadiistvan/scpl/io/DataStream.h>
-
-#include <hu/varadiistvan/scpl/Thread.h>
-
-#include <cstdio>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::Waiter;
-using hu::varadiistvan::scpl::io::LocalClientSocket;
-using hu::varadiistvan::scpl::io::LocalConnector;
-using hu::varadiistvan::scpl::io::DataStream;
-
-using hu::varadiistvan::scpl::Thread;
-
-//------------------------------------------------------------------------------
-
-int main()
-{
-    Waiter waiter;
-
-    LocalClientSocket socket1("testmc", &waiter);
-    LocalConnector& connector1 = socket1.getConnector();
-    printf("Connecting...\n");
-    connector1.connect();
-    printf("Connected...\n");
-    DataStream stream1(socket1);
-
-    stream1.writeU8(0x02);
-    stream1.flush();
-
-    Thread::sleep(5000);
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: st/testmultiserver.cc
===================================================================
--- test/testmultiserver.cc	(revision 14)
+++ 	(revision )
@@ -1,140 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include <hu/varadiistvan/scpl/io/Waiter.h>
-#include <hu/varadiistvan/scpl/io/LocalServerSocket.h>
-#include <hu/varadiistvan/scpl/io/LocalAcceptor.h>
-#include <hu/varadiistvan/scpl/io/BufferedStream.h>
-#include <hu/varadiistvan/scpl/io/DataStream.h>
-
-#include <hu/varadiistvan/scpl/Thread.h>
-
-#include <cstdio>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::Waiter;
-using hu::varadiistvan::scpl::io::LocalServerSocket;
-using hu::varadiistvan::scpl::io::LocalAcceptor;
-using hu::varadiistvan::scpl::io::BufferedStream;
-using hu::varadiistvan::scpl::io::DataStream;
-
-using hu::varadiistvan::scpl::Thread;
-
-//------------------------------------------------------------------------------
-
-class ServerThread : public Thread
-{
-    hu::varadiistvan::scpl::io::Waiter waiter;
-
-    hu::varadiistvan::scpl::io::BufferedStream* bufferedStream;
-
-    hu::varadiistvan::scpl::io::DataStream stream;
-
-public:
-    ServerThread(hu::varadiistvan::scpl::io::LocalAcceptor& acceptor);
-
-    virtual void run();
-};
-
-//------------------------------------------------------------------------------
-
-ServerThread::ServerThread(LocalAcceptor& acceptor) :
-    bufferedStream(acceptor.getSocket(&waiter)),
-    stream(*bufferedStream)
-{
-    printf("Created ServerThread[%p]\n", this);
-}
-
-//------------------------------------------------------------------------------
-
-void ServerThread::run()
-{
-    while(stream) {
-        uint8_t value = stream.readU8();
-        if (!stream) continue;
-
-        printf("ServerThread[%p]: value=0x%02x\n", this, value);
-    }
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-class ListenThread : public Thread
-{
-public:
-    virtual void run();
-};
-
-
-//------------------------------------------------------------------------------
-
-void ListenThread::run()
-{
-    printf("ListenThread::run\n");
-
-    Waiter waiter;
-
-    LocalServerSocket socket("testmc", &waiter);
-
-    LocalAcceptor& acceptor = socket.getAcceptor();
-    while(!acceptor.failed()) {
-        printf("ListenThread::run: accepting...\n");
-        while (acceptor.accept()) {
-            printf("ListenThread::run: connection accepted\n");
-            ServerThread* serverThread = new ServerThread(acceptor);
-            serverThread->start();
-        }
-        printf("ListenThread::run: waiting...\n");
-        waiter.wait();
-        printf("ListenThread::run: waited...\n");
-    }
-}
-
-//------------------------------------------------------------------------------
-
-int main()
-{
-    ListenThread listenThread;
-    listenThread.start();
-
-    while(true) {
-        Thread::sleep(3600*1000);
-    };
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: st/testmutex.cc
===================================================================
--- test/testmutex.cc	(revision 4)
+++ 	(revision )
@@ -1,162 +1,0 @@
-// Copyright (c) 2012 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include <hu/varadiistvan/scpl/Thread.h>
-#include <hu/varadiistvan/scpl/Mutex.h>
-
-#include <cstdlib>
-#include <cstdio>
-#include <cassert>
-
-#include <signal.h>
-
-#include <sys/time.h>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::Thread;
-using hu::varadiistvan::scpl::Mutex;
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-class Thread1 : public Thread
-{
-private:
-    Mutex& mutex;
-
-public:
-    Thread1(Mutex& mutex);
-
-    virtual void run();
-};
-
-//------------------------------------------------------------------------------
-
-inline Thread1::Thread1(Mutex& mutex) :
-    mutex(mutex)
-{
-}
-
-//------------------------------------------------------------------------------
-
-void Thread1::run()
-{
-    printf("Thread1::run: locking mutex\n");
-    mutex.lock();
-    printf("Thread1::run: locked mutex, sleeping...\n");
-
-    sleep(5000);
-
-    printf("Thread1::run: woke up, releasing mutex\n");
-    mutex.unlock();
-
-    printf("Thread1::run: released mutex, sleeping\n");
-
-    sleep(1000);
-
-    printf("Thread1::run: woke up, locking mutex\n");
-    mutex.lock();
-    printf("Thread1::run: locked mutex, releasing\n");
-    mutex.unlock();
-
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-class Thread2 : public Thread
-{
-private:
-    Mutex& mutex;
-
-public:
-    Thread2(Mutex& mutex);
-
-    virtual void run();
-};
-
-//------------------------------------------------------------------------------
-
-inline Thread2::Thread2(Mutex& mutex) :
-    mutex(mutex)
-{
-}
-
-//------------------------------------------------------------------------------
-
-void Thread2::run()
-{
-    printf("Thread2::run: sleeping\n");
-    sleep(1000);
-
-    printf("Thread2::run: woke up, trying to lock mutex...\n");
-
-    while(!mutex.tryLock()) {
-        sleep(200);
-    }
-
-    printf("Thread2::run: locked mutex, sleeping...\n");
-    sleep(5000);
-    printf("Thread2::run: woke up, releasing mutex\n");
-    mutex.unlock();
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-int main()
-{
-    Mutex mutex;
-
-    Thread1 thread1(mutex);
-    Thread2 thread2(mutex);
-
-    printf("Starting threads\n");
-    thread1.start();
-    thread2.start();
-
-
-    printf("Waiting for thread1\n");
-    thread1.join();
-    printf("Waiting for thread2\n");
-    thread2.join();
-    printf("Both threads returned\n");
-
-    return 0;
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: st/testrandom.cc
===================================================================
--- test/testrandom.cc	(revision 11)
+++ 	(revision )
@@ -1,69 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of libxplcommon, a common utility library for
-// development related to X-Plane
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include <hu/varadiistvan/scpl/PseudoRandom.h>
-
-#include <cstdio>
-#include <ctime>
-#include <cstdlib>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::PseudoRandom;
-
-//------------------------------------------------------------------------------
-
-int main(int argc, char* argv[])
-{
-    unsigned int seed = (argc>1) ? atoi(argv[1]) : time(0);
-
-    printf("seed=%u\n", seed);
-
-    srand(seed);
-    PseudoRandom pr(seed);
-    for(size_t i = 0; i<10000; ++i) {
-        int r1 = rand();
-        int r2 = pr.next();
-        if (r1!=r2) {
-            printf("values at i=%zu differ: rand(): %d, PseudoRandom: %d\n",
-                   i, r1, r2);
-            break;
-        }
-    }
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: st/testtcpsock.cc
===================================================================
--- test/testtcpsock.cc	(revision 37)
+++ 	(revision )
@@ -1,410 +1,0 @@
-// Copyright (c) 2012 by István Váradi
-
-// This file is part of libxplcommon, a common utility library for
-// development related to X-Plane
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include <hu/varadiistvan/scpl/io/Waiter.h>
-#include <hu/varadiistvan/scpl/io/TCPServerSocket.h>
-#include <hu/varadiistvan/scpl/io/TCPAcceptor.h>
-#include <hu/varadiistvan/scpl/io/TCPSocket.h>
-#include <hu/varadiistvan/scpl/io/TCPClientSocket.h>
-#include <hu/varadiistvan/scpl/io/TCPConnector.h>
-#include <hu/varadiistvan/scpl/io/ReadingBuffer.h>
-#include <hu/varadiistvan/scpl/io/WritingBuffer.h>
-#include <hu/varadiistvan/scpl/io/WaitableEvent.h>
-
-#include <hu/varadiistvan/scpl/Thread.h>
-#include <hu/varadiistvan/scpl/PseudoRandom.h>
-
-#include <cstdlib>
-#include <cstdio>
-#include <cassert>
-
-#include <signal.h>
-
-#include <sys/time.h>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::io::Waiter;
-using hu::varadiistvan::scpl::io::TCPServerSocket;
-using hu::varadiistvan::scpl::io::TCPAcceptor;
-using hu::varadiistvan::scpl::io::TCPSocket;
-using hu::varadiistvan::scpl::io::TCPClientSocket;
-using hu::varadiistvan::scpl::io::TCPConnector;
-using hu::varadiistvan::scpl::io::ReadingBuffer;
-using hu::varadiistvan::scpl::io::WritingBuffer;
-using hu::varadiistvan::scpl::io::WaitableEvent;
-
-using hu::varadiistvan::scpl::Thread;
-using hu::varadiistvan::scpl::PseudoRandom;
-
-using std::min;
-
-//------------------------------------------------------------------------------
-
-void communicate(ReadingBuffer* readingBuffer, WritingBuffer* writingBuffer,
-                 Waiter& waiter, unsigned seed, const char* prefix,
-                 WaitableEvent* quitEvent = 0)
-{
-    static const size_t minToWrite = 2076;
-    static const size_t maxToWrite = 1345670;
-
-    static const size_t reportingInterval = 10000;
-
-    static const int sleepThreshold = static_cast<int>(PseudoRandom::MAX * 0.99);
-    static const int sleepRemainder = PseudoRandom::MAX - sleepThreshold;
-    static const unsigned minSleep = 10;
-    static const unsigned maxSleep = 250;
-    static const unsigned sleepRange = maxSleep - minSleep;
-
-    size_t numBytesRead = 0;
-    size_t nextReportRead = reportingInterval;
-    size_t numWriteBlocked = 0;
-    size_t numBytesWritten = 0;
-    size_t nextReportWritten = reportingInterval;
-    size_t numReadBlocked = 0;
-    size_t numMillisSlept = 0;
-
-    bool toQuit = false;
-
-    PseudoRandom random(seed);
-    while(!toQuit) {
-        size_t toWrite = random.nextUnsigned(maxToWrite, minToWrite);
-
-        size_t lastWriteLength = 0;
-        if (writingBuffer!=0) {
-            lastWriteLength = min(writingBuffer->getCapacity(), toWrite);
-            writingBuffer->reset();
-            writingBuffer->addLength(lastWriteLength);
-        }
-
-        while(toWrite>0) {
-            if (quitEvent!=0 && quitEvent->check()) {
-                toQuit = true;
-                break;
-            }
-
-            bool hasPending = false;
-
-            if (writingBuffer!=0) {
-                size_t loopCount = 0;
-                while(toWrite>0) {
-                    ++loopCount;
-                    if (writingBuffer->write()) {
-                        numBytesWritten += lastWriteLength;
-                        toWrite -= lastWriteLength;
-
-                        if (numBytesWritten>=nextReportWritten) {
-                            printf("%s: written %lu bytes with %lu blocking and %lu ms sleeping\n",
-                                   prefix,
-                                   static_cast<unsigned long>(numBytesWritten),
-                                   static_cast<unsigned long>(numWriteBlocked),
-                                   static_cast<unsigned long>(numMillisSlept));
-                            nextReportWritten += reportingInterval;
-                        }
-
-                        if (toWrite>0) {
-                            if (quitEvent!=0 && quitEvent->check()) {
-                                toQuit = true;
-                                break;
-                            } else {
-                                lastWriteLength = min(writingBuffer->getCapacity(), toWrite);
-                                writingBuffer->addLength(lastWriteLength);
-                                if (loopCount>10) {
-                                    break;
-                                }
-                            }
-                        }
-                    } else if (writingBuffer->failed()) {
-                        printf("%s: writing failed with error: %lu\n",
-                               prefix,
-                               static_cast<unsigned long>(writingBuffer->getErrorCode()));
-                        toQuit = true;
-                        break;
-                    } else {
-                        ++numWriteBlocked;
-                        hasPending = true;
-                        break;
-                    }
-                }
-                if (toQuit) break;
-            }
-
-            if (readingBuffer!=0) {
-                size_t loopCount = 0;
-                while(true) {
-                    ++loopCount;
-                    if (readingBuffer->read()) {
-                        size_t l = readingBuffer->getLength();
-                        if (l==0) {
-                            printf("%s: reading encountered end of file\n", prefix);
-                            toQuit = true;
-                            break;
-                        }
-                        numBytesRead += l;
-                        if (numBytesRead>=nextReportRead) {
-                            printf("%s: read %lu bytes with %lu blocking and %lu ms sleeping\n",
-                                   prefix,
-                                   static_cast<unsigned long>(numBytesRead),
-                                   static_cast<unsigned long>(numReadBlocked),
-                                   static_cast<unsigned long>(numMillisSlept));
-                            nextReportRead += reportingInterval;
-                        }
-                        readingBuffer->reset();
-                        if (quitEvent!=0 && quitEvent->check()) {
-                            toQuit = true;
-                            break;
-                        } else if (loopCount>10) {
-                            break;
-                        }
-                    } else if (readingBuffer->failed()) {
-                        printf("%s: reading failed with error: %lu\n",
-                               prefix,
-                               static_cast<unsigned long>(readingBuffer->getErrorCode()));
-                        toQuit = true;
-                        break;
-                    } else {
-                        ++numReadBlocked;
-                        hasPending = true;
-                        break;
-                    }
-                }
-                if (toQuit) break;
-            }
-
-            int r = random.next();
-            if (r>=sleepThreshold) {
-                unsigned toSleep = minSleep +
-                    static_cast<unsigned>(static_cast<double>(r - sleepThreshold) *
-                                          sleepRange / sleepRemainder);
-                assert(toSleep>=minSleep);
-                assert(toSleep<maxSleep);
-                Thread::sleep(toSleep);
-                numMillisSlept += toSleep;
-            }
-
-            if (toWrite>0 && hasPending) {
-                waiter.wait();
-                if (waiter.failed()) {
-                    printf("%s: waiting failed with error: %lu\n",
-                           prefix,
-                           static_cast<unsigned long>(waiter.getErrorCode()));
-                    toQuit = true;
-                    break;
-                }
-            }
-        }
-    }
-
-    printf("%s: written %lu bytes with %lu blocking\n",
-           prefix,
-           static_cast<unsigned long>(numBytesWritten),
-           static_cast<unsigned long>(numWriteBlocked));
-    printf("%s: read %lu bytes with %lu blocking\n",
-           prefix,
-           static_cast<unsigned long>(numBytesRead),
-           static_cast<unsigned long>(numReadBlocked));
-    printf("%s: slept %lu ms\n", prefix,
-           static_cast<unsigned long>(numMillisSlept));
-}
-
-//------------------------------------------------------------------------------
-
-class ServerThread : public Thread
-{
-private:
-    Waiter waiter;
-
-    WaitableEvent event;
-
-public:
-    ServerThread();
-
-    void signal();
-
-    virtual void run();
-};
-
-//------------------------------------------------------------------------------
-
-ServerThread::ServerThread() :
-    event(&waiter)
-{
-}
-
-//------------------------------------------------------------------------------
-
-void ServerThread::signal()
-{
-    event.fire();
-}
-
-//------------------------------------------------------------------------------
-
-void ServerThread::run()
-{
-    unsigned seed = static_cast<unsigned>(time(0)*1.2);
-    printf("ServerThread::run: seed=%u\n", seed);
-
-    TCPServerSocket serverSocket(12345, &waiter);
-    TCPAcceptor& acceptor = serverSocket.getAcceptor();
-
-    bool eventFired = false;
-    while(!acceptor.accept()) {
-        eventFired = event.check();
-        if (eventFired) break;
-        if (acceptor.failed()) {
-            printf("ServerThread::run: acceptor failed...: %lu\n",
-                   (unsigned long)acceptor.getErrorCode());
-            return;
-        }
-        printf("ServerThread::run: waiting...\n");
-        waiter.wait();
-        printf("ServerThread::run: waiting done...\n");
-    }
-
-    if (eventFired) {
-        printf("ServerThread::run: waiting done, quitting\n");
-        return;
-    }
-
-    printf("ServerThread::run: waiting done, received connection\n");
-    TCPSocket* socket = acceptor.getSocket();
-
-    communicate(&socket->getReadingBuffer(), &socket->getWritingBuffer(),
-                waiter, seed, "ServerThread", &event);
-
-
-    delete socket;
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-class ClientThread : public Thread
-{
-private:
-    Waiter waiter;
-
-    WaitableEvent event;
-
-public:
-    ClientThread();
-
-    void signal();
-
-    virtual void run();
-};
-
-//------------------------------------------------------------------------------
-
-ClientThread::ClientThread() :
-    event(&waiter)
-{
-}
-
-//------------------------------------------------------------------------------
-
-void ClientThread::signal()
-{
-    event.fire();
-}
-
-//------------------------------------------------------------------------------
-
-void ClientThread::run()
-{
-    unsigned seed = static_cast<unsigned>(time(0)*1.8);
-    printf("ClientThread::run: seed=%u\n", seed);
-
-    printf("ClientThread::run: sleeping\n");
-    sleep(500);
-    printf("ClientThread::run: connecting\n");
-
-    TCPClientSocket socket("127.0.0.1", 12345, &waiter);
-
-    TCPConnector& connector = socket.getConnector();
-
-    while(!connector.connect()) {
-        if (connector.failed()) {
-            printf("ClientThread::run: connector failed...: %lu\n",
-                   (unsigned long)connector.getErrorCode());
-            return;
-        }
-        printf("ClientThread::run: waiting... waiter=%p\n", &waiter);
-        waiter.wait();
-        printf("ClientThread::run: waiting done\n");
-    }
-
-    printf("ClientThread::run: connected\n");
-
-    communicate(&socket.getReadingBuffer(), &socket.getWritingBuffer(),
-                waiter, seed, "ClientThread", &event);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-int main()
-{
-#if TARGET_API_POSIX
-    signal(SIGPIPE, SIG_IGN);
-#endif
-
-    ServerThread serverThread;
-    ClientThread clientThread;
-
-    printf("Starting threads\n");
-    serverThread.start();
-    clientThread.start();
-
-    Thread::sleep(60000);
-    //Thread::sleep(5000);
-    printf("Signalling the server thread\n");
-    //serverThread.signal();
-    clientThread.signal();
-    printf("Signalled the server thread\n");
-
-    printf("Waiting for the client thread\n");
-    clientThread.join();
-    printf("Waiting for the server thread\n");
-    serverThread.join();
-    printf("Both threads returned\n");
-
-    return 0;
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: st/testthread.cc
===================================================================
--- test/testthread.cc	(revision 2)
+++ 	(revision )
@@ -1,103 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of VSCPL, a simple cross-platform utility library
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include <hu/varadiistvan/scpl/Thread.h>
-
-#include <algorithm>
-
-#include <cstdio>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::scpl::Thread;
-
-using std::min;
-
-//------------------------------------------------------------------------------
-
-class TestThread : public Thread
-{
-private:
-    unsigned long id;
-
-public:
-    TestThread(unsigned long id);
-
-    virtual void run();
-};
-
-//------------------------------------------------------------------------------
-
-inline TestThread::TestThread(unsigned long id) :
-    Thread(true),
-    id(id)
-{
-}
-
-//------------------------------------------------------------------------------
-
-void TestThread::run()
-{
-    printf("TestThread: id=%lu\n", id);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-int main()
-{
-    static const size_t numThreads = 1000;
-
-    TestThread** threads = new TestThread*[numThreads];
-
-    unsigned long id = 1;
-    while(true) {
-        for(size_t i = 0; i<numThreads; ++i) {
-            threads[i] = new TestThread(id++);
-            threads[i]->start();
-        }
-
-        Thread::sleep(2000);
-
-        // for(size_t i = 0; i<numThreads; ++i) {
-        //     delete threads[i];
-        // }
-    }
-
-    return 0;
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
