Functions | |
| void | connect_client (std::string_view host, std::string_view port) |
| void | list_directory (mxnetwork::Socket &sock) |
| void | listen_server (std::string_view port) |
| void | listen_signal (int) |
| std::optional< size_t > | parse_content_length (std::string_view data) |
| std::optional< std::string > | parse_get_filename (std::string_view command) |
| bool | parse_port (const char *value, unsigned int &port) |
| void | print_progress (int &prev, size_t length, size_t progress) |
| void | process_input (mxnetwork::Socket sock) |
| std::optional< std::string > | read_command (mxnetwork::Socket &sock) |
| void | receive_file (mxnetwork::Socket &sock, std::string_view command) |
| void | receive_listing (mxnetwork::Socket &sock) |
| void | request_stop () |
| void | send_error (mxnetwork::Socket &sock, std::string_view message) |
| void | send_file (mxnetwork::Socket &sock, std::string_view filename) |
| bool | send_text (mxnetwork::Socket &sock, std::string_view text) |
| bool | valid_filename (std::string_view filename) |
| bool | validate_port (const char *program, const char *value, unsigned int &port) |
Variables | |
| std::atomic< bool > | active_loop {false} |
| constexpr size_t | buffer_size = 4096 |
| std::atomic< mxnetwork::Socket * > | listen_socket {nullptr} |
| constexpr unsigned int | port_max = 4951 |
| constexpr unsigned int | port_min = 1024 |
| constexpr int | progress_width = 48 |
| void anonymous_namespace{fileserve.cpp}::connect_client | ( | std::string_view | host, |
| std::string_view | port ) |
Definition at line 381 of file fileserve.cpp.
| void anonymous_namespace{fileserve.cpp}::list_directory | ( | mxnetwork::Socket & | sock | ) |
Definition at line 75 of file fileserve.cpp.
| void anonymous_namespace{fileserve.cpp}::listen_server | ( | std::string_view | port | ) |
Definition at line 212 of file fileserve.cpp.
| void anonymous_namespace{fileserve.cpp}::listen_signal | ( | int | ) |
Definition at line 207 of file fileserve.cpp.
| std::optional< size_t > anonymous_namespace{fileserve.cpp}::parse_content_length | ( | std::string_view | data | ) |
Definition at line 267 of file fileserve.cpp.
| std::optional< std::string > anonymous_namespace{fileserve.cpp}::parse_get_filename | ( | std::string_view | command | ) |
Definition at line 287 of file fileserve.cpp.
| bool anonymous_namespace{fileserve.cpp}::parse_port | ( | const char * | value, |
| unsigned int & | port ) |
Definition at line 417 of file fileserve.cpp.
| void anonymous_namespace{fileserve.cpp}::print_progress | ( | int & | prev, |
| size_t | length, | ||
| size_t | progress ) |
Definition at line 243 of file fileserve.cpp.
| void anonymous_namespace{fileserve.cpp}::process_input | ( | mxnetwork::Socket | sock | ) |
Definition at line 172 of file fileserve.cpp.
| std::optional< std::string > anonymous_namespace{fileserve.cpp}::read_command | ( | mxnetwork::Socket & | sock | ) |
Definition at line 147 of file fileserve.cpp.
| void anonymous_namespace{fileserve.cpp}::receive_file | ( | mxnetwork::Socket & | sock, |
| std::string_view | command ) |
Definition at line 318 of file fileserve.cpp.
| void anonymous_namespace{fileserve.cpp}::receive_listing | ( | mxnetwork::Socket & | sock | ) |
Definition at line 300 of file fileserve.cpp.
| void anonymous_namespace{fileserve.cpp}::request_stop | ( | ) |
Definition at line 35 of file fileserve.cpp.
| void anonymous_namespace{fileserve.cpp}::send_error | ( | mxnetwork::Socket & | sock, |
| std::string_view | message ) |
Definition at line 57 of file fileserve.cpp.
| void anonymous_namespace{fileserve.cpp}::send_file | ( | mxnetwork::Socket & | sock, |
| std::string_view | filename ) |
Definition at line 100 of file fileserve.cpp.
| bool anonymous_namespace{fileserve.cpp}::send_text | ( | mxnetwork::Socket & | sock, |
| std::string_view | text ) |
Definition at line 53 of file fileserve.cpp.
| bool anonymous_namespace{fileserve.cpp}::valid_filename | ( | std::string_view | filename | ) |
Definition at line 63 of file fileserve.cpp.
| bool anonymous_namespace{fileserve.cpp}::validate_port | ( | const char * | program, |
| const char * | value, | ||
| unsigned int & | port ) |
Definition at line 423 of file fileserve.cpp.
| std::atomic<bool> anonymous_namespace{fileserve.cpp}::active_loop {false} |
Definition at line 32 of file fileserve.cpp.
|
constexpr |
Definition at line 29 of file fileserve.cpp.
| std::atomic<mxnetwork::Socket *> anonymous_namespace{fileserve.cpp}::listen_socket {nullptr} |
Definition at line 33 of file fileserve.cpp.
|
constexpr |
Definition at line 28 of file fileserve.cpp.
|
constexpr |
Definition at line 27 of file fileserve.cpp.
|
constexpr |
Definition at line 30 of file fileserve.cpp.