mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
further work on the HttpServer stuff. not functional yet. just sharing
what crimes i'm committing.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user