<commit_before>#include <system_error>
#include "net/sender.hpp"
#include "net/address_info.hpp"
#include "net/stream_buffer.hpp"

namespace net
{

std::streambuf* sender::distribute()
{
    return net::distribute(m_group, m_service);
}

std::streambuf* distribute(const std::string& group, const std::string& service, unsigned ttl)
{
    const net::address_info distribute_address{group, service, SOCK_DGRAM};
    for(const auto& address : distribute_address)
    {
        net::socket s{address.ai_family, address.ai_socktype, address.ai_protocol};
        if(!s)
            continue;

        unsigned ttl_{ttl};
        auto status = net::setsockopt(s, IPPROTO_IP, IP_MULTICAST_TTL, &ttl_, sizeof ttl_);
        if(status < 0)
            continue;
<commit_msg>Update sender.cpp<commit_after>#include <system_error>
#include "net/sender.hpp"
#include "net/address_info.hpp"
#include "net/stream_buffer.hpp"

namespace net
{

std::streambuf* sender::distribute()
{
    return net::distribute(m_group, m_service);
}

std::streambuf* distribute(const std::string& group, const std::string& service, unsigned ttl)
{
    const net::address_info distribution_address{group, service, SOCK_DGRAM};
    for(const auto& address : distribution_address)
    {
        net::socket s{address.ai_family, address.ai_socktype, address.ai_protocol};
        if(!s)
            continue;

        unsigned ttl_{ttl};
        auto status = net::setsockopt(s, IPPROTO_IP, IP_MULTICAST_TTL, &ttl_, sizeof ttl_);
        if(status < 0)
            continue;

{'fraction_non_alphanumeric': 0.12402597402597403, 'fraction_numerical': 0.0012987012987012987, 'mean_word_length': 3.98705501618123, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '6230127', 'n_tokens_mistral': 506, 'n_tokens_neox': 501, 'n_words': 105}