mirror of
https://github.com/xorgy/mediafire-fuse
synced 2026-01-13 13:14:29 -08:00
Replace cfile.c with connection.c
- cfile.h needed too many function calls and was too complex
- connection.h does
- only download in binary mode (json can handle that)
- have no excess of getters and setters
- allow to execute the whole request in a single function call
- allow to be re-used for multiple requests
- as a result, the code has 600 lines of code less
- originally, connection.h was developed to use a global curl
handle for all requests such that the same connection could be
re-used. Unfortunately the MediaFire servers will close the
connection after each request from their end:
Bryan: "Unfortunately, we won't ever do keep-alive. Closing the
connection is a small part of a larger set of heuristics we have in
place to prevent DOS/DDOS attacks."
This causes massive performance impacts and those grow even larger when
using SSL because the handshake has to be executed for every single
request again.
This commit is contained in:
@@ -2,8 +2,8 @@ cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
project(mediafire-tools)
|
||||
|
||||
set(mf-sources account.c cfile.c cmd_auth.c cmd_chdir.c cmd_debug.c cmd_file.c cmd_get.c cmd_help.c cmd_host.c cmd_lcd.c cmd_links.c cmd_list.c cmd_lpwd.c cmd_mkdir.c cmd_pwd.c cmd_whoami.c console.c download.c file.c file_info.c file_links.c folder.c folder_create.c folder_info.c json.c keys.c list.c mfshell.c signals.c signature.c strings.c stringv.c user_session.c)
|
||||
set(mf-headers account.h cfile.h chdir.h command.h console.h download.h file_info.h file_links.h folder_create.h folder_info.h json.h list.h macros.h mfshell.h private.h signals.h strings.h stringv.h user_session.h)
|
||||
set(mf-sources account.c cmd_auth.c cmd_chdir.c cmd_debug.c cmd_file.c cmd_get.c cmd_help.c cmd_host.c cmd_lcd.c cmd_links.c cmd_list.c cmd_lpwd.c cmd_mkdir.c cmd_pwd.c cmd_whoami.c connection.c console.c download.c file.c file_info.c file_links.c folder.c folder_create.c folder_info.c json.c keys.c list.c mfshell.c signals.c signature.c strings.c stringv.c user_session.c)
|
||||
set(mf-headers account.h chdir.h command.h connection.h console.h download.h file_info.h file_links.h folder_create.h folder_info.h json.h list.h macros.h mfshell.h private.h signals.h strings.h stringv.h user_session.h)
|
||||
|
||||
add_library(mf-obj OBJECT ${mf-sources} ${mf-headers})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user