From 8898ad9b25fca6afe2374d293a981db02a83d7e9 Mon Sep 17 00:00:00 2001 From: "FWoltermann@gmail.com" Date: Thu, 31 May 2012 14:46:27 +0000 Subject: Committing the documentation to svn to have it accessible online --- Doc/doxygen/html/_http_client_8cpp_source.html | 185 +++++++++++++++++++++++++ 1 file changed, 185 insertions(+) create mode 100644 Doc/doxygen/html/_http_client_8cpp_source.html (limited to 'Doc/doxygen/html/_http_client_8cpp_source.html') diff --git a/Doc/doxygen/html/_http_client_8cpp_source.html b/Doc/doxygen/html/_http_client_8cpp_source.html new file mode 100644 index 0000000..271d10d --- /dev/null +++ b/Doc/doxygen/html/_http_client_8cpp_source.html @@ -0,0 +1,185 @@ + + + + + +Starshatter_Open: D:/SRC/StarshatterSVN/NetEx/HttpClient.cpp Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
Starshatter_Open +
+
Open source Starshatter engine
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
HttpClient.cpp
+
+
+Go to the documentation of this file.
1 /* Project nGenEx
+
2  Destroyer Studios LLC
+
3  Copyright © 1997-2004. All Rights Reserved.
+
4 
+
5  SUBSYSTEM: NetEx.lib
+
6  FILE: HttpClient.cpp
+
7  AUTHOR: John DiCamillo
+
8 
+
9 
+
10  OVERVIEW
+
11  ========
+
12  Network Server Pump for HTTP Server
+
13 */
+
14 
+
15 
+
16 #include "MemDebug.h"
+
17 #include "HttpClient.h"
+
18 #include "NetHost.h"
+
19 #include "NetLayer.h"
+
20 #include <mmsystem.h>
+
21 
+
22 // +-------------------------------------------------------------------+
+
23 
+
24 HttpClient::HttpClient(const NetAddr& server_addr)
+
25  : NetClient(server_addr)
+
26 {
+
27 }
+
28 
+ +
30 {
+
31  cookies.destroy();
+
32 }
+
33 
+ + +
36 {
+
37  // add existing cookies to request before sending:
+
38  CombineCookies(request.GetCookies(), cookies);
+
39 
+
40  Text req = request.operator Text();
+
41  Text msg = SendRecv(req);
+
42  HttpResponse* response = new(__FILE__,__LINE__) HttpResponse(msg);
+
43 
+
44  if (response) {
+
45  // save cookies returned in response:
+
46  CombineCookies(cookies, response->GetCookies());
+
47  }
+
48 
+
49  return response;
+
50 }
+
51 
+
52 void
+ +
54 {
+
55  for (int i = 0; i < src.size(); i++) {
+
56  HttpParam* s = src[i];
+
57  HttpParam* d = dst.find(s);
+
58 
+
59  if (d) {
+
60  d->value = s->value;
+
61  }
+
62  else {
+
63  HttpParam* cookie = new(__FILE__,__LINE__) HttpParam(s->name, s->value);
+
64  if (cookie)
+
65  dst.append(cookie);
+
66  }
+
67  }
+
68 }
+
+
+ + + + -- cgit v1.1