ppd/include/io.hh
2023-03-13 09:49:28 +01:00

34 lines
613 B
C++

#pragma once
#include <sys/types.h>
#include <sys/param.h>
#include <sys/cpuset.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <openssl/ssl.h>
#include <stdint.h>
#include <stdio.h>
#include <time.h>
#include <bsock/bsock.h>
#include "mod.h"
struct ppd_bsock_io_ssl_ctx {
SSL * ssl;
char * ssl_readbuf;
size_t ssl_readbuf_len;
};
struct bsock_ringbuf_io ppd_bsock_io_ssl(void);
int ppd_readmsg(struct bsock *bsock, char *buf, size_t len);
int ppd_writemsg(struct bsock *bsock, struct ppd_msg *msg);
int
ppd_readbuf(int fd, void *buf, int len);
int
ppd_writebuf(int fd, void *buf, int len);