* Moved BlockingQueue, DoubleDictionary, and ExpiringCache into OpenMetaverseTypes.dll

* First attempt at an EventQueueServer implementation, untested
* Implemented a capabilities server that can route capabilities to local callbacks or remote URIs
* Modified HttpServer.HttpRequestCallback to return a bool: true to close the connection, false to leave it open
* Removed all locks from HttpServer and added try/catch around HttpListenerContext operations
* Added Color4.FromHSV()

git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2379 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
John Hurliman
2008-12-15 19:13:24 +00:00
parent 674d4ea653
commit 7f8cffafd2
10 changed files with 1209 additions and 103 deletions

View File

@@ -41,6 +41,7 @@ namespace OpenMetaverse.Capabilities
private string contentType;
private string path;
/// <summary>HTTP method</summary>
public string Method
{
get { return method; }
@@ -50,6 +51,7 @@ namespace OpenMetaverse.Capabilities
else method = String.Empty;
}
}
/// <summary>HTTP Content-Type</summary>
public string ContentType
{
get { return contentType; }
@@ -59,16 +61,21 @@ namespace OpenMetaverse.Capabilities
else contentType = String.Empty;
}
}
/// <summary>Relative URL path</summary>
public string Path
{
get { return path; }
set
{
if (!String.IsNullOrEmpty(value)) path = value.ToLower();
if (!String.IsNullOrEmpty(value)) path = value;
else path = String.Empty;
}
}
/// <summary>
/// Constructor
/// </summary>
/// <param name="context">HTTP request to build a signature for</param>
public HttpRequestSignature(HttpListenerContext context)
{
method = contentType = path = String.Empty;
@@ -123,6 +130,11 @@ namespace OpenMetaverse.Capabilities
return hash;
}
public override string ToString()
{
return String.Format("{0} {1} Content-Type: {2}", method, path, contentType);
}
/// <summary>
/// Does pattern matching to determine if an incoming HTTP request
/// matches a given pattern. The incoming request must be on the