vozhyk- / megahttp Goto Github PK
View Code? Open in Web Editor NEWHTTP server that streams files from mega.co.nz cloud storage
HTTP server that streams files from mega.co.nz cloud storage
Should have a reference to the megaApi it needs to use (global or account).
http://localhost:8080/status/
Show some status information:
http://localhost:8080/[email protected]/path/to/file
Needs to detect the type from buffer.
So that lines from different threads is not mixed together.
Use locks / condition variables / ...
Currently, megahttp allocates memory for the whole file. This will result in bad things happening when trying to download files too big to allocate.
What needs to be done is:
file_cache_item
into file_buffer
block_size
parameterfile_buffer
when chunk requested or storedfile_cache_item
-> cached_file
file_buffer
structure to:
vector<char>
)file_buffer::block
)cached_file.get_chunk
to copy data instead of returning its address
get_data
response_callback
.position .. response_callback
.download.position) (โ response_callback
s serving the file)
response_callback
should have its own download
download
s should start MEGA downloads for missing pieces and skip pieces already in cache
cached_file
s should track which ranges are downloaded and which are protected from GC
range
classcached_file
s should be deletedWIP on branch big_files
http://localhost:8080/...?docache=no
or similar.
file_offset is not reset on new request
On Raspberry Pi (B), Buildroot 2016.11 http://server_ip:8080/status
reports very small values of total memory used by the cache (usually smaller than one of the files in the cache). But it reports the individual files' used memory as designed.
This might be caused by 0cf41ab, but that should be confirmed.
Add log levels, etc.
EDIT: Now make MEGA SDK's own logging behave in the same way
(write in-memory items to disk when memory used by cache > limit)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.