source: golgotha/src/test/web_crawl/database.hh @ 80

Last change on this file since 80 was 80, checked in by Sam Hocevar, 14 years ago
  • Adding the Golgotha source code. Not sure what's going to be interesting in there, but since it's all public domain, there's certainly stuff to pick up.
File size: 1.4 KB
Line 
1/********************************************************************** <BR>
2  This file is part of Crack dot Com's free source code release of
3  Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for
4  information about compiling & licensing issues visit this URL</a>
5  <PRE> If that doesn't help, contact Jonathan Clark at
6  golgotha_source@usa.net (Subject should have "GOLG" in it)
7***********************************************************************/
8
9
10
11
12
13struct server_info
14{
15  int html_read;       // number of pages we've read from this server
16  int html_waiting;    // number of pages waiting to be read fromt his server
17
18  int files_read;     
19  int files_failed;
20  int files_waiting; 
21
22  server_info *next;
23};
24
25
26
27struct split_url
28{
29  enum { FILE, HTTP } type;
30  char server[100];
31  int  port;
32  char page[100];
33  char extension[100];
34
35  split_url(char *url_name);
36};
37
38
39struct url
40
41  char *full_name;
42  server_info *server_for;
43
44  w32 checksum(); 
45  url(char *name,            // text name of url "http://crack.com:80/test.html"
46      url *server_from=0);   // in case url is a relative path we need to know where it came from
47
48  ~url();                    // frees memory use allocated by constructor
49
50  void split(split_url &s); // splits the url into type, server name, page, and extension
51 
52};
53
54
Note: See TracBrowser for help on using the repository browser.