<commit_before>// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <vespa/vespalib/net/crypto_socket.h>
#include <vespa/vespalib/net/socket_handle.h>
#include <vespa/vespalib/data/smart_buffer.h>
#include "crypto_codec.h"

namespace vespalib::net::tls {

/**
 * Component adapting an underlying CryptoCodec to the CryptoSocket
 * interface by performing buffer and socket management.
 *
 * NOTE: initial implementation is for functionality/proof-of-concept
 * purposes, not performance.<commit_msg>remove performance disclaimer related to using SimpleBuffer<commit_after>// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <vespa/vespalib/net/crypto_socket.h>
#include <vespa/vespalib/net/socket_handle.h>
#include <vespa/vespalib/data/smart_buffer.h>
#include "crypto_codec.h"

namespace vespalib::net::tls {

/**
 * Component adapting an underlying CryptoCodec to the CryptoSocket
 * interface by performing buffer and socket management.
{'fraction_non_alphanumeric': 0.09009812667261374, 'fraction_numerical': 0.010704727921498661, 'mean_word_length': 5.233333333333333, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '825722', 'n_tokens_mistral': 340, 'n_tokens_neox': 320, 'n_words': 108}