<commit_before>#include <vector>
#include <string>
#include <queue>

#include "../Interface/Thread.h"
#include "../Interface/Types.h"

class IMutex;
class IPipe;
class ISettingsReader;
class CTCPStack;
class ICustomClient;
class IScopedLock;
class ICondition;

struct SServerSettings
{
	std::string name;
	unsigned short port;
	std::string clientname;
	std::string authkey;
	bool internet_compress;
	bool internet_encrypt;
	bool internet_connect_always;
};

class InternetClient : public IThread
{
public:
	static void init_mutex(void);
	static void destroy_mutex(void);
	static void hasLANConnection(void);
	static bool isConnected(void);
	static void setHasConnection(bool b);
	static int64 timeSinceLastLanConnection();

	static void newConnection(void);
	static void rmConnection(void);

	static THREADPOOL_TICKET start(bool use_pool=false);
	static void stop(THREADPOOL_TICKET tt=ILLEGAL_THREADPOOL_TICKET);

	void operator()(void);

	void doUpdateSettings(void);
	bool tryToConnect(IScopedLock *lock);

	static void setHasAuthErr(void);
	static void resetAuthErr(void);

	static void updateSettings(void);

	static void addOnetimeToken(const std::string &token);
	static std::pair<unsigned int, std::string> getOnetimeToken(void);<commit_msg>Don't log token authentication failures as error log messages<commit_after>#include <vector>
#include <string>
#include <queue>

#include "../Interface/Thread.h"
#include "../Interface/Types.h"

class IMutex;
class IPipe;
class ISettingsReader;
class CTCPStack;
class ICustomClient;
class IScopedLock;
class ICondition;

struct SServerSettings
{
	std::string name;
	unsigned short port;
	std::string clientname;
	std::string authkey;
	bool internet_compress;
	bool internet_encrypt;
	bool internet_connect_always;
};

class InternetClient : public IThread
{
public:
	static void init_mutex(void);
	static void destroy_mutex(void);
	static void hasLANConnection(void);
	static bool isConnected(void);
	static void setHasConnection(bool b);
	static int64 timeSinceLastLanConnection();

	static void newConnection(void);
	static void rmConnection(void);

	static THREADPOOL_TICKET start(bool use_pool=false);
	static void stop(THREADPOOL_TICKET tt=ILLEGAL_THREADPOOL_TICKET);

	void operator()(void);

	void doUpdateSettings(void);
	bool tryToConnect(IScopedLock *lock);

	static void setHasAuthErr(void);
	static void resetAuthErr(void);

	static void updateSettings(void);

	static void addOnetimeToken(const std::string &token);
	static std::pair<unsigned int, std::string> getOnetimeToken(void);
	static void clearOnetimeTokens();
{'fraction_non_alphanumeric': 0.09693679720822024, 'fraction_numerical': 0.0015509887553315238, 'mean_word_length': 7.037383177570093, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '6792519', 'n_tokens_mistral': 823, 'n_tokens_neox': 805, 'n_words': 220}