THRIFT-926. cpp: Better buffer management for TNonblockingServer
authorDavid Reiss <dreiss@apache.org>
Wed, 6 Oct 2010 17:10:52 +0000 (17:10 +0000)
committerDavid Reiss <dreiss@apache.org>
Wed, 6 Oct 2010 17:10:52 +0000 (17:10 +0000)
commit89a12942d2fd53a3caf269f601134bd392fbf333
treea17b266e332517537ac9dc7c4aee10cbd2d23e32
parent7e729d207492f8b4be9509e927b687a282039bc9
THRIFT-926. cpp: Better buffer management for TNonblockingServer

Add two improvements to memory management in TNonblocking server:
- Separate the receive code into two distinct states: one for receiving
  the frame header and one for the frame content.  This allows us to
  size the initial read buffer based on the initial frame size, rather
  than allocating an arbitrary amount of memory before reading the
  header.
- Allow setting the initial write buffer size based on the application's
  expected response size.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1005169 13f79535-47bb-0310-9956-ffa450edef68
lib/cpp/src/server/TNonblockingServer.cpp
lib/cpp/src/server/TNonblockingServer.h