Update of /cvsroot/sharedaemon/sharedaemon-ui-web/src/server/http
In directory sc8-pr-cvs1:/tmp/cvs-serv7723/src/server/http
Modified Files:
HttpServerSocket.cpp
Log Message:
30/12/2003 Mikael Barbeaux
* Implemented a Http processor thread object.
* Implemented a Http connections manager object.
* Modified configure script for pthread library.
Index: HttpServerSocket.cpp
===================================================================
RCS file: /cvsroot/sharedaemon/sharedaemon-ui-web/src/server/http/HttpServerSocket.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- HttpServerSocket.cpp 27 Dec 2003 11:56:06 -0000 1.6
+++ HttpServerSocket.cpp 30 Dec 2003 10:45:09 -0000 1.7
@@ -18,6 +18,7 @@
*/
#include "HttpServerSocket.h"
+#include "manager/HttpManager.h"
#include "TextWriter.h"
#include <iostream>
using namespace std;
@@ -76,25 +77,7 @@
continue;
}
// process the connection
- //theManager->addConnection(client);
-
- cout << "Socket accepted !" << endl;
- HttpRequest request;
- cout << "Receiving HTTP request..." << endl;
- client->receiveHttpRequest(request);
- cout << "Reveiced mesage : " << endl;
- cout << request.toString() << endl;
- cout << "Send response" << endl;
- TextWriter *writer = new TextWriter;
- *writer << "<html><body>Request received !</body></html>";
- writer->close();
- HttpResponse response(writer);
- response.setContentType("text/html");
- client->sendHttpResponse(response);
- cout << "Closing socket..." << endl;
- client->close();
- delete client;
-
+ theManager->addConnection(client);
}
catch(Exception& e) {
cout << e.getMessage() << endl;
|