<commit_before>/*
	Header for the 'sck' library by <NAME> (http://zeusw.org/intl/contact.html)
	Copyright (C) 2000-2004 <NAME> (http://zeusw.org/intl/contact.html).

	This file is part of the Epeios (http://zeusw.org/epeios/) project.

	This library is free software; you can redistribute it and/or
	modify it under the terms of the GNU General Public License
	as published by the Free Software Foundation; either version 3
	of the License, or (at your option) any later version.
 
	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this program; if not, go to http://www.fsf.org/
	or write to the:
  
         	         Free Software Foundation, Inc.,
           59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*/

//	$Id: sck.h,v 1.55 2013/05/17 15:03:50 csimon Exp $

#ifndef SCK__INC
#define SCK__INC

#define SCK_NAME		"SCK"

#define	SCK_VERSION	"$Revision: 1.55 $"

#define SCK_OWNER		"<NAME> (http://zeusw.org/intl/contact.html)"

#include "ttr.h"

extern class ttr_tutor &SCKTutor;

#if defined( E_DEBUG ) && !defined( SCK_NODBG )
#define SCK_DBG
#endif

/* Begin of automatic documentation generation part. */

//V $Revision: 1.55 $
//C <NAME> (http://zeusw.org/intl/contact.html)
//R $Date: 2013/05/17 15:03:50 $

/* End of automatic documentation generation part. */

/******************************************************************************/
				  /* do not modify anything above this limit */
				  /*			  unless specified			 */
				  /*******************************************/

/* Addendum to the automatic documentation generation part. */
//D SoCKet 
/* End addendum to automatic documentation generation part. */

/*$BEGIN$*/

#include "err.h"
#include "cpe.h"
#include "fdr.h"
#include "flw.h"
#include "tol.h"

#if defined( CPE_POSIX )
#	define SCK__POSIX
#elif defined( CPE_WIN )
#	define SCK__WIN
#else
#	error "Uknown target !"
#endif

#ifdef SCK__WIN
#	include <winsock.h>
#	define SCK_INVALID_SOCKET		INVALID_SOCKET
#	define SCK_SOCKET_ERROR			SOCKET_ERROR
#	define SCK_ECONNRESET			WSAECONNRESET
#	define SCK_EWOULDBLOCK			WSAEWOULDBLOCK
#	define SCK_EAGAIN				WSAEWOULDBLOCK	// Pas de 'WSAEAGAIN', mais mettre a simplifie certaines lignes.
#	define SCK_EINTR				WSAEINTR
#	define SCK_ENOTSOCK				WSAENOTSOCK
#elif defined( SCK__POSIX )
#  include <arpa/inet.h>
#	include <sys/time.h>
#	include <sys/types.h>
#	include <sys/socket.h>
#	include <unistd.h>
#	include <netinet/in.h>
#	include <sys/ioctl.h>
#	include <errno.h>
#	define SCK_INVALID_SOCKET		-1
#	define SCK_SOCKET_ERROR			-1
#	define SCK_ECONNRESET			ECONNRESET
#	define SCK_EWOULDBLOCK			EWOULDBLOCK
#	define SCK_EAGAIN				EAGAIN
#	define SCK_EINTR				EINTR
#	define SCK_ENOTSOCK				ENOTSOCK
#else
#	error
#endif

//d Value to give to the 'TimeOut' parameter to indicate waiting forever.
#define SCK_INFINITE	BSO_U16_MAX

//d Returned value to indicate that the connection no longer exists.
#define SCK_DISCONNECTED	-1

#ifndef SCK_SOCKET_FLOW_BUFFER_SIZE
//d The size of the buffers used by the flows.
#	define SCK_SOCKET_FLOW_BUFFER_SIZE	500
#endif

#ifdef SCK_DEFAULT_TIMEOUT
#	define SCK__DEFAULT_TIMEOUT	SCK_DEFAULT_TIMEOUT
#else
#	define SCK__DEFAULT_TIMEOUT	SCK_INFINITE
#endif

//d Max data amount of concurrent write and read.
#define SCK__DEFAULT_AMOUNT	( 100 * 1024 * 1024 )

namespace sck {
	using flw::datum__;
#ifdef SCK__WIN
	typedef SOCKET socket__;
	typedef char *	cast__;
#elif defined( SCK__POSIX )
	typedef int	socket__;
	typedef void * cast__;
#else
#	error
#endif
<commit_msg>21/07/2014 19:40:25<commit_after>/*
	Header for the 'sck' library by <NAME> (http://zeusw.org/intl/contact.html)
	Copyright (C) 2000-2004 <NAME> (http://zeusw.org/intl/contact.html).

	This file is part of the Epeios (http://zeusw.org/epeios/) project.

	This library is free software; you can redistribute it and/or
	modify it under the terms of the GNU General Public License
	as published by the Free Software Foundation; either version 3
	of the License, or (at your option) any later version.
 
	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this program; if not, go to http://www.fsf.org/
	or write to the:
  
         	         Free Software Foundation, Inc.,
           59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*/

//	$Id: sck.h,v 1.55 2013/05/17 15:03:50 csimon Exp $

#ifndef SCK__INC
#define SCK__INC

#define SCK_NAME		"SCK"

#define	SCK_VERSION	"$Revision: 1.55 $"

#define SCK_OWNER		"<NAME> (http://zeusw.org/intl/contact.html)"

#include "ttr.h"

extern class ttr_tutor &SCKTutor;

#if defined( E_DEBUG ) && !defined( SCK_NODBG )
#define SCK_DBG
#endif

/* Begin of automatic documentation generation part. */

//V $Revision: 1.55 $
//C <NAME> (http://zeusw.org/intl/contact.html)
//R $Date: 2013/05/17 15:03:50 $

/* End of automatic documentation generation part. */

/******************************************************************************/
				  /* do not modify anything above this limit */
				  /*			  unless specified			 */
				  /*******************************************/

/* Addendum to the automatic documentation generation part. */
//D SoCKet 
/* End addendum to automatic documentation generation part. */

/*$BEGIN$*/

#include "err.h"
#include "cpe.h"
#include "fdr.h"
#include "flw.h"
#include "tol.h"

#if defined( CPE_POSIX )
#	define SCK__POSIX
#elif defined( CPE_WIN )
#	define SCK__WIN
#else
#	error "Uknown target !"
#endif

#ifdef SCK__WIN
#	include <winsock.h>
#	define SCK_INVALID_SOCKET		INVALID_SOCKET
#	define SCK_SOCKET_ERROR			SOCKET_ERROR
#	define SCK_ECONNRESET			WSAECONNRESET
#	define SCK_EWOULDBLOCK			WSAEWOULDBLOCK
#	define SCK_EAGAIN				WSAEWOULDBLOCK	// Pas de 'WSAEAGAIN', mais mettre a simplifie certaines lignes.
#	define SCK_EINTR				WSAEINTR
#	define SCK_ENOTSOCK				WSAENOTSOCK
#elif defined( SCK__POSIX )
#  include <arpa/inet.h>
#	include <sys/time.h>
#	include <sys/types.h>
#	include <sys/socket.h>
#	include <unistd.h>
#	include <netinet/in.h>
#	include <sys/ioctl.h>
#	include <errno.h>
#	define SCK_INVALID_SOCKET		-1
#	define SCK_SOCKET_ERROR			-1
#	define SCK_ECONNRESET			ECONNRESET
#	define SCK_EWOULDBLOCK			EWOULDBLOCK
#	define SCK_EAGAIN				EAGAIN
#	define SCK_EINTR				EINTR
#	define SCK_ENOTSOCK				ENOTSOCK
#else
#	error
#endif

//d Value to give to the 'TimeOut' parameter to indicate waiting forever.
#define SCK_INFINITE	BSO_U16_MAX

//d Returned value to indicate that the connection no longer exists.
#define SCK_DISCONNECTED	-1

#ifndef SCK_SOCKET_FLOW_BUFFER_SIZE
//d The size of the buffers used by the flows.
#	define SCK_SOCKET_FLOW_BUFFER_SIZE	500
#endif

#ifdef SCK_DEFAULT_TIMEOUT
#	define SCK__DEFAULT_TIMEOUT	SCK_DEFAULT_TIMEOUT
#else
#	define SCK__DEFAULT_TIMEOUT	SCK_INFINITE
#endif

//d Max data amount of concurrent write and read.
#define SCK__DEFAULT_AMOUNT	FLW_AMOUNT_MAX

namespace sck {
	using flw::datum__;
#ifdef SCK__WIN
	typedef SOCKET socket__;
	typedef char *	cast__;
#elif defined( SCK__POSIX )
	typedef int	socket__;
	typedef void * cast__;
#else
#	error
#endif

{'fraction_non_alphanumeric': 0.12408855892880817, 'fraction_numerical': 0.021344292721728754, 'mean_word_length': 3.996026490066225, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6147294', 'n_tokens_mistral': 2975, 'n_tokens_neox': 2705, 'n_words': 837}