Add injector

This commit is contained in:
Nullptr
2023-01-29 22:38:00 +08:00
parent fc8b7c1b4d
commit 70024cc082
17 changed files with 653 additions and 69 deletions

View File

@@ -0,0 +1,20 @@
#pragma once
#include <string>
#include "logging.h"
namespace socket_utils {
ssize_t xread(int fd, void *buf, size_t count);
ssize_t xwrite(int fd, const void *buf, size_t count);
size_t read_usize(int fd);
std::string read_string(int fd);
bool write_u8(int fd, uint8_t val);
int recv_fd(int fd);
}