diff --git a/test/csharp/ThriftTest/TestClient.cs b/test/csharp/ThriftTest/TestClient.cs
index 1d7c75e..60fc995 100644
--- a/test/csharp/ThriftTest/TestClient.cs
+++ b/test/csharp/ThriftTest/TestClient.cs
@@ -39,7 +39,7 @@
 				int port = 9090;
 				string url = null;
 				int numThreads = 1;
-				bool buffered = false;
+				bool buffered = false, framed = false;
 
 				try
 				{
@@ -67,6 +67,11 @@
 							buffered = true;
 							Console.WriteLine("Using buffered sockets");
 						}
+						else if (args[i] == "-f" || args[i] == "-framed")
+						{
+							framed = true;
+							Console.WriteLine("Using framed transport");
+						}
 						else if (args[i] == "-t")
 						{
 							numThreads = Convert.ToInt32(args[++i]);
@@ -89,16 +94,13 @@
 					threads[test] = t;
 					if (url == null)
 					{
-						TSocket socket = new TSocket(host, port);
+						TTransport trans = new TSocket(host, port);
 						if (buffered)
-						{
-							TBufferedTransport buffer = new TBufferedTransport(socket);
-							t.Start(buffer);
-						}
-						else
-						{
-							t.Start(socket);
-						}
+							trans = new TBufferedTransport(trans as TStreamTransport);
+						if (framed)
+							trans = new TFramedTransport(trans);
+							
+						t.Start(trans);
 					}
 					else
 					{
@@ -428,6 +430,12 @@
 
 			Console.WriteLine("Test Oneway(1)");
 			client.testOneway(1);
+
+			Console.Write("Test Calltime()");
+			var startt = DateTime.UtcNow;
+			for ( int k=0; k<1000; ++k )
+				client.testVoid();
+			Console.WriteLine(" = " + (DateTime.UtcNow - startt).TotalSeconds.ToString() + " ms a testVoid() call" );
 		}
 	}
 }
diff --git a/test/csharp/ThriftTest/TestServer.cs b/test/csharp/ThriftTest/TestServer.cs
index e370640..894ec9c 100644
--- a/test/csharp/ThriftTest/TestServer.cs
+++ b/test/csharp/ThriftTest/TestServer.cs
@@ -301,7 +301,7 @@
 		{
 			try
 			{
-				bool useBufferedSockets = false;
+				bool useBufferedSockets = false, useFramed = false;
 				int port = 9090;
 				if (args.Length > 0)
 				{
@@ -309,7 +309,23 @@
 
 					if (args.Length > 1)
 					{
-						bool.TryParse(args[1], out useBufferedSockets);
+						if ( args[1] == "raw" )
+						{
+							// as default
+						}
+						else if ( args[1] == "buffered" )
+						{
+							useBufferedSockets = true;
+						}
+						else if ( args[1] == "framed" )
+						{
+							useFramed = true;
+						}
+						else
+						{
+							// Fall back to the older boolean syntax
+							bool.TryParse(args[1], out useBufferedSockets);
+						}
 					}
 				}
 
@@ -320,10 +336,12 @@
 				// Transport
 				TServerSocket tServerSocket = new TServerSocket(port, 0, useBufferedSockets);
 
-				TServer serverEngine;
-
 				// Simple Server
-				serverEngine = new TSimpleServer(testProcessor, tServerSocket);
+				TServer serverEngine;
+				if ( useFramed )
+					serverEngine = new TSimpleServer(testProcessor, tServerSocket, new TFramedTransport.Factory());
+				else
+					serverEngine = new TSimpleServer(testProcessor, tServerSocket);
 
 				// ThreadPool Server
 				// serverEngine = new TThreadPoolServer(testProcessor, tServerSocket);
@@ -334,7 +352,10 @@
 				testHandler.server = serverEngine;
 
 				// Run it
-				Console.WriteLine("Starting the server on port " + port + (useBufferedSockets ? " with buffered socket" : "") + "...");
+				Console.WriteLine("Starting the server on port " + port + 
+					(useBufferedSockets ? " with buffered socket" : "") + 
+					(useFramed ? " with framed transport" : "") + 
+					"...");
 				serverEngine.Serve();
 
 			}
