Minor changes to simple C# examples (#26)
* Workaround for https://github.com/apache/arrow/issues/40634
* Change server URI for compatibility with other examples
diff --git a/http/get_simple/csharp/client/ArrowHttpClient.cs b/http/get_simple/csharp/client/ArrowHttpClient.cs
index d23327b..32229f1 100644
--- a/http/get_simple/csharp/client/ArrowHttpClient.cs
+++ b/http/get_simple/csharp/client/ArrowHttpClient.cs
@@ -28,7 +28,7 @@
{
public static async Task Main(string[] args)
{
- string serverUri = "http://127.0.0.1:8008/";
+ string serverUri = "http://localhost:8008/";
DateTime startTime = DateTime.UtcNow;
@@ -42,7 +42,6 @@
{
Console.WriteLine("Connected");
- Schema schema = reader.Schema;
List<RecordBatch> batches = new List<RecordBatch>();
int numRows = 0;
@@ -52,6 +51,7 @@
numRows += batch.Length;
batches.Add(batch);
}
+ Schema schema = reader.Schema;
DateTime endTime = DateTime.UtcNow;
diff --git a/http/get_simple/csharp/server/ArrowHttpServer.cs b/http/get_simple/csharp/server/ArrowHttpServer.cs
index 7273947..13c90d8 100644
--- a/http/get_simple/csharp/server/ArrowHttpServer.cs
+++ b/http/get_simple/csharp/server/ArrowHttpServer.cs
@@ -76,7 +76,7 @@
public static async Task Main(string[] args)
{
- string serverUri = "http://127.0.0.1:8008/";
+ string serverUri = "http://*:8008/";
HttpListener listener = new HttpListener();
listener.Prefixes.Add(serverUri);