diff --git a/lib/cpp/src/server/TNonblockingServer.cpp b/lib/cpp/src/server/TNonblockingServer.cpp
index cd7951d..8aec9d8 100644
--- a/lib/cpp/src/server/TNonblockingServer.cpp
+++ b/lib/cpp/src/server/TNonblockingServer.cpp
@@ -297,20 +297,16 @@
 
     // If the function call generated return data, then move into the send
     // state and get going
+    // 4 bytes were reserved for frame size
     if (writeBufferSize_ > 4) {
 
       // Move into write state
       writeBufferPos_ = 0;
       socketState_ = SOCKET_SEND;
 
-      if (server_->getFrameResponses()) {
-        // Put the frame size into the write buffer
-        int32_t frameSize = (int32_t)htonl(writeBufferSize_ - 4);
-        memcpy(writeBuffer_, &frameSize, 4);
-      } else {
-        // Go straight into sending the result, do not frame it
-        writeBufferPos_ = 4;
-      }
+      // Put the frame size into the write buffer
+      int32_t frameSize = (int32_t)htonl(writeBufferSize_ - 4);
+      memcpy(writeBuffer_, &frameSize, 4);
 
       // Socket into write mode
       appState_ = APP_SEND_RESULT;
diff --git a/lib/cpp/src/server/TNonblockingServer.h b/lib/cpp/src/server/TNonblockingServer.h
index 9d426fa..9deaebd 100644
--- a/lib/cpp/src/server/TNonblockingServer.h
+++ b/lib/cpp/src/server/TNonblockingServer.h
@@ -49,9 +49,6 @@
   // Port server runs on
   int port_;
 
-  // Whether to frame responses
-  bool frameResponses_;
-
   // For processing via thread pool, may be NULL
   boost::shared_ptr<ThreadManager> threadManager_;
 
@@ -83,7 +80,6 @@
     TServer(processor),
     serverSocket_(-1),
     port_(port),
-    frameResponses_(true),
     threadPoolProcessing_(false),
     eventBase_(NULL),
     numTConnections_(0) {}
@@ -95,7 +91,6 @@
     TServer(processor),
     serverSocket_(-1),
     port_(port),
-    frameResponses_(true),
     threadManager_(threadManager),
     eventBase_(NULL),
     numTConnections_(0) {
@@ -116,7 +111,6 @@
     TServer(processor),
     serverSocket_(0),
     port_(port),
-    frameResponses_(true),
     threadManager_(threadManager),
     eventBase_(NULL),
     numTConnections_(0) {
@@ -146,14 +140,6 @@
     threadManager_->add(task);
   }
 
-  void setFrameResponses(bool frameResponses) {
-    frameResponses_ = frameResponses;
-  }
-
-  bool getFrameResponses() const {
-    return frameResponses_;
-  }
-
   event_base* getEventBase() const {
     return eventBase_;
   }
diff --git a/test/cpp/src/TestClient.cpp b/test/cpp/src/TestClient.cpp
index 4b82619..8529938 100644
--- a/test/cpp/src/TestClient.cpp
+++ b/test/cpp/src/TestClient.cpp
@@ -37,7 +37,6 @@
   int port = 9090;
   int numTests = 1;
   bool framed = false;
-  bool frameInput = true;
 
   for (int i = 0; i < argc; ++i) {
     if (strcmp(argv[i], "-h") == 0) {
@@ -53,9 +52,6 @@
       numTests = atoi(argv[++i]);
     } else if (strcmp(argv[i], "-f") == 0) {
       framed = true;
-    } else if (strcmp(argv[i], "-fo") == 0) {
-      framed = true;
-      frameInput = false;
     }
   }
 
@@ -66,13 +62,7 @@
 
   if (framed) {
     shared_ptr<TFramedTransport> framedSocket(new TFramedTransport(socket));
-    framedSocket->setRead(frameInput);
     transport = framedSocket;
-    if (frameInput) {
-      printf("Using bi-directional framed transport mode\n");
-    } else {
-      printf("Using framed output only mode\n");
-    }
   } else {
     shared_ptr<TBufferedTransport> bufferedSocket(new TBufferedTransport(socket));
     transport = bufferedSocket;
diff --git a/test/cpp/src/TestServer.cpp b/test/cpp/src/TestServer.cpp
index 0c58a29..ce18aaf 100644
--- a/test/cpp/src/TestServer.cpp
+++ b/test/cpp/src/TestServer.cpp
@@ -274,7 +274,6 @@
   string serverType = "simple";
   string protocolType = "binary";
   size_t workerCount = 4;
-  bool frameOutput = true;
 
   ostringstream usage;
 
@@ -309,10 +308,6 @@
       port = atoi(args["port"].c_str());
     }
 
-    if (!args["noframe"].empty()) {
-      frameOutput = false;
-    }
-
     if (!args["server-type"].empty()) {
       serverType = args["server-type"];
       if (serverType == "simple") {
@@ -400,18 +395,9 @@
     threadedServer.serve();
 
   } else if (serverType == "nonblocking") {
-
     TNonblockingServer nonblockingServer(testProcessor, port);
-    nonblockingServer.setFrameResponses(frameOutput);
-    if (frameOutput) {
-      printf("Using framed output mode\n");
-    } else {
-      printf("Using non-framed output mode\n");
-    }
-
     printf("Starting the nonblocking server on port %d...\n", port);
     nonblockingServer.serve();
-
   }
 
   printf("done.\n");
