further work on the HttpServer stuff. not functional yet. just sharing

what crimes i'm committing.
This commit is contained in:
Dr Scofield
2008-06-25 13:10:12 +00:00
parent b713f4a540
commit daca971bf6
4 changed files with 126 additions and 11 deletions

View File

@@ -31,25 +31,28 @@ using HttpServer;
namespace OpenSim.Framework.Servers
{
/// <summary>
/// OSHttpServer provides an HTTP server bound to a specific
/// port. When instantiated with just address and port it uses
/// normal HTTP, when instantiated with address, port, and X509
/// certificate, it uses HTTPS.
/// An OSHttpRequestPump fetches incoming OSHttpRequest objects
/// from the OSHttpRequestQueue and feeds them to all subscribed
/// parties. Each OSHttpRequestPump encapsulates one thread to do
/// the work and there is a fixed number of pumps for each
/// OSHttpServer object.
/// </summary>
public class OSHttpRequestPump
{
protected OSHttpServer _httpServer;
protected OSHttpServer _server;
protected OSHttpRequestQueue _queue;
public OSHttpRequestPump()
{
}
public static OSHttpRequestPump[] Pumps(OSHttpServer server, int poolSize)
public static OSHttpRequestPump[] Pumps(OSHttpServer server, OSHttpRequestQueue queue, int poolSize)
{
OSHttpRequestPump[] pumps = new OSHttpRequestPump[poolSize];
for (int i = 0; i < pumps.Length; i++)
{
pumps[i]._httpServer = server;
pumps[i]._server = server;
pumps[i]._queue = queue;
}
return pumps;