1#ifndef joedb_Server_File_declared
2#define joedb_Server_File_declared
29 static void write_to_body_error();
30 void write_checkpoint();
49 std::chrono::milliseconds wait
55 int64_t server_position,
56 int64_t until_position,
63 size_t pread(
char *data,
size_t size, int64_t offset)
const override;
64 void pwrite(
const char *data,
size_t size, int64_t offset)
override;
Used by Robust_Connection to reconnect after an error.
int64_t get_size() const override
Get the size of the file, or -1 if it is unknown.
Server_Connection that automatically reconnects on error
Directly read file served from joedb_server.
int64_t get_size() const override
Get the size of the file, or -1 if it is unknown.
size_t pread(char *data, size_t size, int64_t offset) const override
Read a range of bytes.
int64_t push(const Readonly_Journal &client_journal, int64_t server_position, int64_t until_position, Unlock_Action unlock_action) override
Push new data to the connection.
int64_t pull(Lock_Action lock_action, Data_Transfer data_transfer, Writable_Journal &client_journal, std::chrono::milliseconds wait) override
Pull from the connection.
void pwrite(const char *data, size_t size, int64_t offset) override
Write a range of bytes. Extend file size if necessary.
int64_t handshake(const Readonly_Journal &client_journal, Content_Check content_check) override
Called during Client construction.