#include "net/socket/socket_bio_adapter.h"
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include "base/check_op.h"
#include "base/debug/alias.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/notreached.h"
#include "base/task/single_thread_task_runner.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "net/socket/socket.h"
#include "net/socket/stream_socket.h"
#include "net/ssl/openssl_ssl_util.h"
#include "net/traffic_annotation/network_traffic_annotation.h"
#include "third_party/boringssl/src/include/openssl/bio.h"
namespace {
const net::NetworkTrafficAnnotationTag kTrafficAnnotation = …;
}
namespace net {
SocketBIOAdapter::SocketBIOAdapter(StreamSocket* socket,
int read_buffer_capacity,
int write_buffer_capacity,
Delegate* delegate)
: … { … }
SocketBIOAdapter::~SocketBIOAdapter() { … }
bool SocketBIOAdapter::HasPendingReadData() { … }
size_t SocketBIOAdapter::GetAllocationSize() const { … }
int SocketBIOAdapter::BIORead(base::span<uint8_t> out) { … }
void SocketBIOAdapter::HandleSocketReadResult(int result) { … }
void SocketBIOAdapter::OnSocketReadComplete(int result) { … }
void SocketBIOAdapter::OnSocketReadIfReadyComplete(int result) { … }
int SocketBIOAdapter::BIOWrite(base::span<const uint8_t> in) { … }
void SocketBIOAdapter::SocketWrite() { … }
void SocketBIOAdapter::HandleSocketWriteResult(int result) { … }
void SocketBIOAdapter::OnSocketWriteComplete(int result) { … }
void SocketBIOAdapter::CallOnReadReady() { … }
SocketBIOAdapter* SocketBIOAdapter::GetAdapter(BIO* bio) { … }
int SocketBIOAdapter::BIOWriteWrapper(BIO* bio, const char* in, int len) { … }
int SocketBIOAdapter::BIOReadWrapper(BIO* bio, char* out, int len) { … }
long SocketBIOAdapter::BIOCtrlWrapper(BIO* bio,
int cmd,
long larg,
void* parg) { … }
const BIO_METHOD* SocketBIOAdapter::BIOMethod() { … }
}