Go to the documentation of this file.
23 #include "../../crypto/internal.h"
32 bool enforce_write_quota;
38 if (bio->
method != &g_async_bio_method) {
41 return (AsyncBio *)bio->
ptr;
44 static int AsyncWrite(
BIO *bio,
const char *
in,
int inl) {
50 if (!
a->enforce_write_quota) {
56 if (
a->write_quota == 0) {
62 if (!
a->datagram && (
size_t)inl >
a->write_quota) {
69 a->write_quota -= (
a->datagram ? 1 :
ret);
74 static int AsyncRead(
BIO *bio,
char *
out,
int outl) {
82 if (
a->read_quota == 0) {
88 if (!
a->datagram && (
size_t)outl >
a->read_quota) {
95 a->read_quota -= (
a->datagram ? 1 :
ret);
100 static long AsyncCtrl(
BIO *bio,
int cmd,
long num,
void *
ptr) {
110 static int AsyncNew(
BIO *bio) {
116 a->enforce_write_quota =
true;
118 bio->
ptr = (
char *)
a;
122 static int AsyncFree(
BIO *bio) {
157 return bssl::UniquePtr<BIO>(
BIO_new(&g_async_bio_method));
161 bssl::UniquePtr<BIO>
ret(
BIO_new(&g_async_bio_method));
190 a->enforce_write_quota = enforce;
long(* bio_info_cb)(BIO *bio, int event, const char *parg, int cmd, long larg, long return_value)
#define BIO_set_retry_write
bssl::UniquePtr< BIO > AsyncBioCreateDatagram()
void AsyncBioEnforceWriteQuota(BIO *bio, bool enforce)
static void * OPENSSL_memset(void *dst, int c, size_t n)
#define BIO_copy_next_retry
void AsyncBioAllowWrite(BIO *bio, size_t count)
const BIO_METHOD * method
#define BIO_callback_ctrl
void AsyncBioAllowRead(BIO *bio, size_t count)
bssl::UniquePtr< BIO > AsyncBioCreate()
UniquePtr< SSL_SESSION > ret
constexpr auto GetData(C &c) noexcept -> decltype(GetDataImpl(c, 0))
#define BIO_set_retry_read
#define BIO_clear_retry_flags
grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:58:35