* [LIBOMV-506] Complete rewrite of CapsBase to use HttpWebRequest instead of our homebrewed WebRequest hack. We lose the upload progress callback but gain IOCP thread instead of System.Thread usage and Keep-Alive support

* Content-Types described in http://tools.ietf.org/html/draft-hamrick-llsd-00 are used for CAPS requests. This *may* be incompatible with the current SL grid, needs testing
* Modified CapsClient requests to require OSDFormat enum and timeout values

git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2680 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
John Hurliman
2009-05-01 06:04:32 +00:00
parent 6d6af6f3f8
commit c5409af63f
19 changed files with 508 additions and 877 deletions

View File

@@ -304,16 +304,6 @@ namespace GridImageUpload
Client.Inventory.RequestCreateItemFromAsset(UploadData, name, "Uploaded with SL Image Upload", AssetType.Texture,
InventoryType.Texture, Client.Inventory.FindFolderForType(AssetType.Texture),
delegate(CapsClient client, long bytesReceived, long bytesSent, long totalBytesToReceive, long totalBytesToSend)
{
if (bytesSent > 0)
{
Transferred = (int)bytesSent;
BeginInvoke((MethodInvoker)delegate() { SetProgress(); });
}
},
delegate(bool success, string status, UUID itemID, UUID assetID)
{
if (this.InvokeRequired)

View File

@@ -1132,8 +1132,8 @@ namespace GridProxy
remoteComplete.Set();
}
);
loginRequest.BeginGetResponse(content, "application/xml+llsd"); //xml+llsd
remoteComplete.WaitOne(30000, false);
loginRequest.BeginGetResponse(content, "application/llsd+xml", 1000 * 100);
remoteComplete.WaitOne(1000 * 100, false);
if (response == null) {
byte[] wr = Encoding.ASCII.GetBytes("HTTP/1.0 500 Internal Server Error\r\nContent-Length: 0\r\n\r\n");

View File

@@ -64,13 +64,6 @@ namespace OpenMetaverse.TestClient
Client.Inventory.RequestCreateItemFromAsset(UploadData, name, "Uploaded with TestClient",
AssetType.Texture, InventoryType.Texture, Client.Inventory.FindFolderForType(AssetType.Texture),
delegate(CapsClient client, long bytesReceived, long bytesSent, long totalBytesToReceive, long totalBytesToSend)
{
if (bytesSent > 0)
Console.WriteLine(String.Format("Texture upload: {0} / {1}", bytesSent, totalBytesToSend));
},
delegate(bool success, string status, UUID itemID, UUID assetID)
{
Console.WriteLine(String.Format(

View File

@@ -216,12 +216,6 @@ namespace importprimscript
AutoResetEvent uploadEvent = new AutoResetEvent(false);
Client.Inventory.RequestCreateItemFromAsset(jp2data, Path.GetFileNameWithoutExtension(filename),
"Uploaded with importprimscript", AssetType.Texture, InventoryType.Texture, UploadFolderID,
delegate(CapsClient client, long bytesReceived, long bytesSent, long totalBytesToReceive, long totalBytesToSend)
{
// FIXME: Do something with progress?
},
delegate(bool success, string status, UUID itemID, UUID assetID)
{
if (success)