<commit_before>#pragma once

#include "Socket.h"

// Generic Socket Subsystem Interface
class ISocketSubsystem
{
public:
	ISocketSubsystem() {}
	virtual ~ISocketSubsystem() {}

	virtual bool Initialize() = 0;
	virtual void Shutdown() = 0;

	virtual ISocket* CreateSocket(const SocketDescription& InDescription) = 0;
	virtual bool DestroySocket(ISocket* Socket)
	{
		bool Result = Socket->Close();
		Socket->Shutdown();

		return Result;
	}

	// Automatically determines a local address and port, then binds the given socket to it. Returns port, 0 on failure.
	virtual int BindSocket(ISocket* Socket, int MaxAttempts, int FailIncrement) = 0;<commit_msg>Added host functions, repair work<commit_after>#pragma once

#include "Socket.h"

#include <string>

// Generic Socket Subsystem Interface
class ISocketSubsystem
{
public:
	ISocketSubsystem() {}
	virtual ~ISocketSubsystem() {}

	virtual bool Initialize() = 0;
	virtual void Shutdown() = 0;

	virtual ISocket* CreateSocket(const SocketDescription& InDescription) = 0;
	virtual bool DestroySocket(ISocket* Socket)
	{
		bool Result = Socket->Close();
		Socket->Shutdown();

		return Result;
	}

	virtual std::string GetHostName() const = 0;

	// Automatically determines a local address and port, then binds the given socket to it. Returns port, 0 on failure.
	virtual int AutoBindSocket(ISocket* Socket, int MaxAttempts, int FailPortIncrement) = 0;
{'fraction_non_alphanumeric': 0.10014306151645208, 'fraction_numerical': 0.007868383404864092, 'mean_word_length': 5.030172413793103, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 8, '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': '2858715', 'n_tokens_mistral': 446, 'n_tokens_neox': 414, 'n_words': 142}