<commit_before>#pragma once
#ifndef UTILITY_ASYNC_HPP
#define UTILITY_ASYNC_HPP

#include <net/inet4.hpp>
#include <fs/disk.hpp>
#include <functional>

class Async
{
  static const size_t PAYLOAD_SIZE = 64000;
  
  typedef net::TCP::Connection_ptr Connection;
  typedef fs::Disk_ptr             Disk;
  typedef fs::FileSystem::Dirent   Dirent;
  
  typedef std::function<void(bool)> next_func;
  typedef std::function<void(fs::error_t, bool)> on_after_func;
  typedef std::function<void(fs::buffer_t, size_t, next_func)> on_write_func;
  
  static void upload_file(
      Disk, 
      const Dirent&, <commit_msg>async: Functions made public<commit_after>#pragma once
#ifndef UTILITY_ASYNC_HPP
#define UTILITY_ASYNC_HPP

#include <net/inet4.hpp>
#include <fs/disk.hpp>
#include <functional>

class Async
{
public:
  static const size_t PAYLOAD_SIZE = 64000;
  
  typedef net::TCP::Connection_ptr Connection;
  typedef fs::Disk_ptr             Disk;
  typedef fs::FileSystem::Dirent   Dirent;
  
  typedef std::function<void(bool)> next_func;
  typedef std::function<void(fs::error_t, bool)> on_after_func;
  typedef std::function<void(fs::buffer_t, size_t, next_func)> on_write_func;
  
  static void upload_file(
      Disk, 
      const Dirent&, 
{'fraction_non_alphanumeric': 0.1090617481956696, 'fraction_numerical': 0.009623095429029671, 'mean_word_length': 4.751152073732719, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '5861110', 'n_tokens_mistral': 460, 'n_tokens_neox': 432, 'n_words': 96}