Code to implement HTTP requests done. Also, rewrote str_to_int64, str_to_double

This commit is contained in:
2022-04-15 17:24:07 -04:00
parent 453809b65c
commit b6d603034e
17 changed files with 3705 additions and 99 deletions

View File

@@ -263,6 +263,12 @@ void StreamBuffer::write_uint64(uint64_t vv) {
write_cursor_ += 8;
}
void StreamBuffer::write_char(char c) {
make_space(1);
write_cursor_[0] = c;
write_cursor_ += 1;
}
void StreamBuffer::write_float(float f) {
make_space(4);
memcpy(write_cursor_, &f, 4);
@@ -307,6 +313,13 @@ int64_t StreamBuffer::read_int64() {
return v;
}
char StreamBuffer::read_char() {
check_available(1);
char c = read_cursor_[0];
read_cursor_ += 1;
return c;
}
float StreamBuffer::read_float() {
check_available(4);
float f;