THRIFT-160. csharp: Created THttpTransport for the C# library based on WebHttpRequest
This patch adds a new THttpTransport to the C# library and adds some related changes to the Makefile and csproj.
Patch: Michael Greene and Todd Gardner
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@957708 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/csharp/ThriftTest/TestClient.cs b/test/csharp/ThriftTest/TestClient.cs
index 2d278b7..1d7c75e 100644
--- a/test/csharp/ThriftTest/TestClient.cs
+++ b/test/csharp/ThriftTest/TestClient.cs
@@ -87,15 +87,23 @@
{
Thread t = new Thread(new ParameterizedThreadStart(ClientThread));
threads[test] = t;
- TSocket socket = new TSocket(host, port);
- if (buffered)
+ if (url == null)
{
- TBufferedTransport buffer = new TBufferedTransport(socket);
- t.Start(buffer);
+ TSocket socket = new TSocket(host, port);
+ if (buffered)
+ {
+ TBufferedTransport buffer = new TBufferedTransport(socket);
+ t.Start(buffer);
+ }
+ else
+ {
+ t.Start(socket);
+ }
}
else
{
- t.Start(socket);
+ THttpClient http = new THttpClient(new Uri(url));
+ t.Start(http);
}
}