forked from EnderUNIX/Aget
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README-Developer
56 lines (40 loc) · 1.47 KB
/
README-Developer
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Ok, Here's a developer's primer for aget source:
The code is splitted into several files:
main.{c|h}
* starts a thread for handling signals.
* gets program options and decides the
program's behviour by setting a few
global variables.
Aget.{c|h}
* get() and resume_get() functions
starts the download process. Depending on the
protocol, necessary methods are called.
resume_get() is for resume jobs. If the there
is a log file of a previous job, the values
are taken from it.
Head.{c|h}
* Before the actual download, a head request
is sent to the server to determine the current
status of the file.
Some values like:
1. HTTP return code (e.g. 404, 206, 403, 200)
2. Content-length
might be of interest there.
Download.{c|h}
* Aget is no more %100 Posix compliant :(
pwrite is from X_OPEN standarts. I had to do it, since I needed
a way to simultaneously write to the same file without loosing
any time while synchronising the threads.
For the time, there is only http_get. When aget is ftp-aware
ftp_get will be in this file.
Resume.{c|h}
* Methods about saving and restoring history files are in this
file.
Signal.{c|h}
* Signal Handling functions.
Misc.{c|h}
* Other functions which do not fit any of the general categories
are stored here. These are generally helper functions...
For more information read the aget source, and you may contact
murat at enderunix dot org.
Tue May 12 08:44:04 EEST 2009