Mark Slee | 9f0c651 | 2007-02-28 23:58:26 +0000 | [diff] [blame] | 1 | // Copyright (c) 2006- Facebook |
| 2 | // Distributed under the Thrift Software License |
| 3 | // |
| 4 | // See accompanying file LICENSE or visit the Thrift site at: |
| 5 | // http://developers.facebook.com/thrift/ |
| 6 | |
Mark Slee | 2f6404d | 2006-10-10 01:37:40 +0000 | [diff] [blame] | 7 | #ifndef _THRIFT_SERVER_TNONBLOCKINGSERVER_H_ |
| 8 | #define _THRIFT_SERVER_TNONBLOCKINGSERVER_H_ 1 |
| 9 | |
Mark Slee | 4af6ed7 | 2006-10-25 19:02:49 +0000 | [diff] [blame] | 10 | #include <Thrift.h> |
| 11 | #include <server/TServer.h> |
David Reiss | 28f298d | 2008-05-01 06:17:36 +0000 | [diff] [blame] | 12 | #include <transport/TBufferTransports.h> |
Mark Slee | e02385b | 2007-06-09 01:21:16 +0000 | [diff] [blame] | 13 | #include <concurrency/ThreadManager.h> |
Mark Slee | 2f6404d | 2006-10-10 01:37:40 +0000 | [diff] [blame] | 14 | #include <stack> |
David Reiss | 9b20955 | 2008-04-08 06:26:05 +0000 | [diff] [blame] | 15 | #include <string> |
| 16 | #include <errno.h> |
David Reiss | d7a16f4 | 2008-02-19 22:47:29 +0000 | [diff] [blame] | 17 | #include <cstdlib> |
Mark Slee | 2f6404d | 2006-10-10 01:37:40 +0000 | [diff] [blame] | 18 | #include <event.h> |
| 19 | |
T Jake Luciani | b5e6221 | 2009-01-31 22:36:20 +0000 | [diff] [blame] | 20 | namespace apache { namespace thrift { namespace server { |
Mark Slee | 2f6404d | 2006-10-10 01:37:40 +0000 | [diff] [blame] | 21 | |
T Jake Luciani | b5e6221 | 2009-01-31 22:36:20 +0000 | [diff] [blame] | 22 | using apache::thrift::transport::TMemoryBuffer; |
| 23 | using apache::thrift::protocol::TProtocol; |
| 24 | using apache::thrift::concurrency::Runnable; |
| 25 | using apache::thrift::concurrency::ThreadManager; |
Mark Slee | 2f6404d | 2006-10-10 01:37:40 +0000 | [diff] [blame] | 26 | |
| 27 | // Forward declaration of class |
| 28 | class TConnection; |
| 29 | |
| 30 | /** |
| 31 | * This is a non-blocking server in C++ for high performance that operates a |
| 32 | * single IO thread. It assumes that all incoming requests are framed with a |
| 33 | * 4 byte length indicator and writes out responses using the same framing. |
| 34 | * |
| 35 | * It does not use the TServerTransport framework, but rather has socket |
| 36 | * operations hardcoded for use with select. |
| 37 | * |
| 38 | * @author Mark Slee <mcslee@facebook.com> |
| 39 | */ |
| 40 | class TNonblockingServer : public TServer { |
| 41 | private: |
| 42 | |
| 43 | // Listen backlog |
| 44 | static const int LISTEN_BACKLOG = 1024; |
| 45 | |
| 46 | // Server socket file descriptor |
| 47 | int serverSocket_; |
| 48 | |
| 49 | // Port server runs on |
| 50 | int port_; |
| 51 | |
Mark Slee | e02385b | 2007-06-09 01:21:16 +0000 | [diff] [blame] | 52 | // For processing via thread pool, may be NULL |
| 53 | boost::shared_ptr<ThreadManager> threadManager_; |
| 54 | |
| 55 | // Is thread pool processing? |
| 56 | bool threadPoolProcessing_; |
| 57 | |
Mark Slee | 79b1694 | 2007-11-26 19:05:29 +0000 | [diff] [blame] | 58 | // The event base for libevent |
| 59 | event_base* eventBase_; |
| 60 | |
| 61 | // Event struct, for use with eventBase_ |
| 62 | struct event serverEvent_; |
| 63 | |
David Reiss | 1997f10 | 2008-04-29 00:29:41 +0000 | [diff] [blame] | 64 | // Number of TConnection object we've created |
| 65 | size_t numTConnections_; |
| 66 | |
Mark Slee | 2f6404d | 2006-10-10 01:37:40 +0000 | [diff] [blame] | 67 | /** |
| 68 | * This is a stack of all the objects that have been created but that |
| 69 | * are NOT currently in use. When we close a connection, we place it on this |
| 70 | * stack so that the object can be reused later, rather than freeing the |
| 71 | * memory and reallocating a new object later. |
| 72 | */ |
| 73 | std::stack<TConnection*> connectionStack_; |
| 74 | |
| 75 | void handleEvent(int fd, short which); |
| 76 | |
| 77 | public: |
Mark Slee | 5ea15f9 | 2007-03-05 22:55:59 +0000 | [diff] [blame] | 78 | TNonblockingServer(boost::shared_ptr<TProcessor> processor, |
Mark Slee | f937339 | 2007-01-24 19:41:57 +0000 | [diff] [blame] | 79 | int port) : |
| 80 | TServer(processor), |
Mark Slee | 79b1694 | 2007-11-26 19:05:29 +0000 | [diff] [blame] | 81 | serverSocket_(-1), |
Mark Slee | f937339 | 2007-01-24 19:41:57 +0000 | [diff] [blame] | 82 | port_(port), |
dweatherford | 5898599 | 2007-06-19 23:10:19 +0000 | [diff] [blame] | 83 | threadPoolProcessing_(false), |
David Reiss | 1997f10 | 2008-04-29 00:29:41 +0000 | [diff] [blame] | 84 | eventBase_(NULL), |
| 85 | numTConnections_(0) {} |
Mark Slee | f937339 | 2007-01-24 19:41:57 +0000 | [diff] [blame] | 86 | |
Mark Slee | 79b1694 | 2007-11-26 19:05:29 +0000 | [diff] [blame] | 87 | TNonblockingServer(boost::shared_ptr<TProcessor> processor, |
Mark Slee | 5ea15f9 | 2007-03-05 22:55:59 +0000 | [diff] [blame] | 88 | boost::shared_ptr<TProtocolFactory> protocolFactory, |
Mark Slee | e02385b | 2007-06-09 01:21:16 +0000 | [diff] [blame] | 89 | int port, |
| 90 | boost::shared_ptr<ThreadManager> threadManager = boost::shared_ptr<ThreadManager>()) : |
Aditya Agarwal | 9abb0d6 | 2007-01-24 22:53:54 +0000 | [diff] [blame] | 91 | TServer(processor), |
Mark Slee | 79b1694 | 2007-11-26 19:05:29 +0000 | [diff] [blame] | 92 | serverSocket_(-1), |
Mark Slee | 92f00fb | 2006-10-25 01:28:17 +0000 | [diff] [blame] | 93 | port_(port), |
Mark Slee | 79b1694 | 2007-11-26 19:05:29 +0000 | [diff] [blame] | 94 | threadManager_(threadManager), |
David Reiss | 1997f10 | 2008-04-29 00:29:41 +0000 | [diff] [blame] | 95 | eventBase_(NULL), |
| 96 | numTConnections_(0) { |
Mark Slee | 5ea15f9 | 2007-03-05 22:55:59 +0000 | [diff] [blame] | 97 | setInputTransportFactory(boost::shared_ptr<TTransportFactory>(new TTransportFactory())); |
| 98 | setOutputTransportFactory(boost::shared_ptr<TTransportFactory>(new TTransportFactory())); |
Aditya Agarwal | 9abb0d6 | 2007-01-24 22:53:54 +0000 | [diff] [blame] | 99 | setInputProtocolFactory(protocolFactory); |
| 100 | setOutputProtocolFactory(protocolFactory); |
Mark Slee | e02385b | 2007-06-09 01:21:16 +0000 | [diff] [blame] | 101 | setThreadManager(threadManager); |
Aditya Agarwal | 9abb0d6 | 2007-01-24 22:53:54 +0000 | [diff] [blame] | 102 | } |
Aditya Agarwal | 1ea9052 | 2007-01-19 02:02:12 +0000 | [diff] [blame] | 103 | |
Mark Slee | 5ea15f9 | 2007-03-05 22:55:59 +0000 | [diff] [blame] | 104 | TNonblockingServer(boost::shared_ptr<TProcessor> processor, |
| 105 | boost::shared_ptr<TTransportFactory> inputTransportFactory, |
| 106 | boost::shared_ptr<TTransportFactory> outputTransportFactory, |
| 107 | boost::shared_ptr<TProtocolFactory> inputProtocolFactory, |
| 108 | boost::shared_ptr<TProtocolFactory> outputProtocolFactory, |
Mark Slee | e02385b | 2007-06-09 01:21:16 +0000 | [diff] [blame] | 109 | int port, |
| 110 | boost::shared_ptr<ThreadManager> threadManager = boost::shared_ptr<ThreadManager>()) : |
Aditya Agarwal | 9abb0d6 | 2007-01-24 22:53:54 +0000 | [diff] [blame] | 111 | TServer(processor), |
Aditya Agarwal | 1ea9052 | 2007-01-19 02:02:12 +0000 | [diff] [blame] | 112 | serverSocket_(0), |
| 113 | port_(port), |
Mark Slee | 5d1784a | 2007-12-05 23:20:54 +0000 | [diff] [blame] | 114 | threadManager_(threadManager), |
David Reiss | 1997f10 | 2008-04-29 00:29:41 +0000 | [diff] [blame] | 115 | eventBase_(NULL), |
| 116 | numTConnections_(0) { |
Aditya Agarwal | 9abb0d6 | 2007-01-24 22:53:54 +0000 | [diff] [blame] | 117 | setInputTransportFactory(inputTransportFactory); |
| 118 | setOutputTransportFactory(outputTransportFactory); |
| 119 | setInputProtocolFactory(inputProtocolFactory); |
| 120 | setOutputProtocolFactory(outputProtocolFactory); |
Mark Slee | e02385b | 2007-06-09 01:21:16 +0000 | [diff] [blame] | 121 | setThreadManager(threadManager); |
Aditya Agarwal | 9abb0d6 | 2007-01-24 22:53:54 +0000 | [diff] [blame] | 122 | } |
Mark Slee | 79b1694 | 2007-11-26 19:05:29 +0000 | [diff] [blame] | 123 | |
Mark Slee | 2f6404d | 2006-10-10 01:37:40 +0000 | [diff] [blame] | 124 | ~TNonblockingServer() {} |
| 125 | |
Mark Slee | e02385b | 2007-06-09 01:21:16 +0000 | [diff] [blame] | 126 | void setThreadManager(boost::shared_ptr<ThreadManager> threadManager) { |
| 127 | threadManager_ = threadManager; |
| 128 | threadPoolProcessing_ = (threadManager != NULL); |
| 129 | } |
| 130 | |
David Reiss | 1997f10 | 2008-04-29 00:29:41 +0000 | [diff] [blame] | 131 | boost::shared_ptr<ThreadManager> getThreadManager() { |
| 132 | return threadManager_; |
| 133 | } |
| 134 | |
Mark Slee | 79b1694 | 2007-11-26 19:05:29 +0000 | [diff] [blame] | 135 | bool isThreadPoolProcessing() const { |
Mark Slee | e02385b | 2007-06-09 01:21:16 +0000 | [diff] [blame] | 136 | return threadPoolProcessing_; |
| 137 | } |
| 138 | |
| 139 | void addTask(boost::shared_ptr<Runnable> task) { |
| 140 | threadManager_->add(task); |
| 141 | } |
| 142 | |
Mark Slee | 79b1694 | 2007-11-26 19:05:29 +0000 | [diff] [blame] | 143 | event_base* getEventBase() const { |
| 144 | return eventBase_; |
| 145 | } |
| 146 | |
David Reiss | c17fe6b | 2008-04-29 00:29:43 +0000 | [diff] [blame] | 147 | void incrementNumConnections() { |
| 148 | ++numTConnections_; |
| 149 | } |
| 150 | |
| 151 | void decrementNumConnections() { |
| 152 | --numTConnections_; |
David Reiss | 1997f10 | 2008-04-29 00:29:41 +0000 | [diff] [blame] | 153 | } |
| 154 | |
| 155 | size_t getNumConnections() { |
| 156 | return numTConnections_; |
| 157 | } |
| 158 | |
| 159 | size_t getNumIdleConnections() { |
| 160 | return connectionStack_.size(); |
| 161 | } |
| 162 | |
Mark Slee | 2f6404d | 2006-10-10 01:37:40 +0000 | [diff] [blame] | 163 | TConnection* createConnection(int socket, short flags); |
| 164 | |
| 165 | void returnConnection(TConnection* connection); |
| 166 | |
| 167 | static void eventHandler(int fd, short which, void* v) { |
| 168 | ((TNonblockingServer*)v)->handleEvent(fd, which); |
| 169 | } |
| 170 | |
Mark Slee | 79b1694 | 2007-11-26 19:05:29 +0000 | [diff] [blame] | 171 | void listenSocket(); |
| 172 | |
| 173 | void listenSocket(int fd); |
| 174 | |
| 175 | void registerEvents(event_base* base); |
| 176 | |
Mark Slee | 2f6404d | 2006-10-10 01:37:40 +0000 | [diff] [blame] | 177 | void serve(); |
| 178 | }; |
| 179 | |
| 180 | /** |
| 181 | * Two states for sockets, recv and send mode |
| 182 | */ |
| 183 | enum TSocketState { |
| 184 | SOCKET_RECV, |
| 185 | SOCKET_SEND |
| 186 | }; |
| 187 | |
| 188 | /** |
| 189 | * Four states for the nonblocking servr: |
| 190 | * 1) initialize |
| 191 | * 2) read 4 byte frame size |
| 192 | * 3) read frame of data |
| 193 | * 4) send back data (if any) |
| 194 | */ |
| 195 | enum TAppState { |
| 196 | APP_INIT, |
| 197 | APP_READ_FRAME_SIZE, |
| 198 | APP_READ_REQUEST, |
Mark Slee | e02385b | 2007-06-09 01:21:16 +0000 | [diff] [blame] | 199 | APP_WAIT_TASK, |
Mark Slee | 2f6404d | 2006-10-10 01:37:40 +0000 | [diff] [blame] | 200 | APP_SEND_RESULT |
| 201 | }; |
| 202 | |
| 203 | /** |
| 204 | * Represents a connection that is handled via libevent. This connection |
| 205 | * essentially encapsulates a socket that has some associated libevent state. |
| 206 | */ |
| 207 | class TConnection { |
| 208 | private: |
| 209 | |
Mark Slee | e02385b | 2007-06-09 01:21:16 +0000 | [diff] [blame] | 210 | class Task; |
| 211 | |
Mark Slee | 2f6404d | 2006-10-10 01:37:40 +0000 | [diff] [blame] | 212 | // Server handle |
| 213 | TNonblockingServer* server_; |
| 214 | |
| 215 | // Socket handle |
| 216 | int socket_; |
| 217 | |
| 218 | // Libevent object |
| 219 | struct event event_; |
| 220 | |
| 221 | // Libevent flags |
| 222 | short eventFlags_; |
| 223 | |
| 224 | // Socket mode |
| 225 | TSocketState socketState_; |
| 226 | |
| 227 | // Application state |
| 228 | TAppState appState_; |
| 229 | |
| 230 | // How much data needed to read |
| 231 | uint32_t readWant_; |
| 232 | |
| 233 | // Where in the read buffer are we |
| 234 | uint32_t readBufferPos_; |
| 235 | |
| 236 | // Read buffer |
| 237 | uint8_t* readBuffer_; |
| 238 | |
| 239 | // Read buffer size |
| 240 | uint32_t readBufferSize_; |
| 241 | |
| 242 | // Write buffer |
| 243 | uint8_t* writeBuffer_; |
Mark Slee | 79b1694 | 2007-11-26 19:05:29 +0000 | [diff] [blame] | 244 | |
Mark Slee | 2f6404d | 2006-10-10 01:37:40 +0000 | [diff] [blame] | 245 | // Write buffer size |
| 246 | uint32_t writeBufferSize_; |
| 247 | |
| 248 | // How far through writing are we? |
| 249 | uint32_t writeBufferPos_; |
| 250 | |
Kevin Clark | 5ace178 | 2009-03-04 21:10:58 +0000 | [diff] [blame] | 251 | // How many times have we read since our last buffer reset? |
| 252 | uint32_t numReadsSinceReset_; |
| 253 | |
| 254 | // How many times have we written since our last buffer reset? |
| 255 | uint32_t numWritesSinceReset_; |
| 256 | |
Mark Slee | e02385b | 2007-06-09 01:21:16 +0000 | [diff] [blame] | 257 | // Task handle |
| 258 | int taskHandle_; |
| 259 | |
| 260 | // Task event |
| 261 | struct event taskEvent_; |
| 262 | |
Mark Slee | 2f6404d | 2006-10-10 01:37:40 +0000 | [diff] [blame] | 263 | // Transport to read from |
Mark Slee | 5ea15f9 | 2007-03-05 22:55:59 +0000 | [diff] [blame] | 264 | boost::shared_ptr<TMemoryBuffer> inputTransport_; |
Mark Slee | 2f6404d | 2006-10-10 01:37:40 +0000 | [diff] [blame] | 265 | |
| 266 | // Transport that processor writes to |
Mark Slee | 5ea15f9 | 2007-03-05 22:55:59 +0000 | [diff] [blame] | 267 | boost::shared_ptr<TMemoryBuffer> outputTransport_; |
Mark Slee | 2f6404d | 2006-10-10 01:37:40 +0000 | [diff] [blame] | 268 | |
Aditya Agarwal | 1ea9052 | 2007-01-19 02:02:12 +0000 | [diff] [blame] | 269 | // extra transport generated by transport factory (e.g. BufferedRouterTransport) |
Mark Slee | 5ea15f9 | 2007-03-05 22:55:59 +0000 | [diff] [blame] | 270 | boost::shared_ptr<TTransport> factoryInputTransport_; |
| 271 | boost::shared_ptr<TTransport> factoryOutputTransport_; |
Mark Slee | 4af6ed7 | 2006-10-25 19:02:49 +0000 | [diff] [blame] | 272 | |
| 273 | // Protocol decoder |
Mark Slee | 5ea15f9 | 2007-03-05 22:55:59 +0000 | [diff] [blame] | 274 | boost::shared_ptr<TProtocol> inputProtocol_; |
Aditya Agarwal | 9abb0d6 | 2007-01-24 22:53:54 +0000 | [diff] [blame] | 275 | |
| 276 | // Protocol encoder |
Mark Slee | 5ea15f9 | 2007-03-05 22:55:59 +0000 | [diff] [blame] | 277 | boost::shared_ptr<TProtocol> outputProtocol_; |
Mark Slee | 79b1694 | 2007-11-26 19:05:29 +0000 | [diff] [blame] | 278 | |
Mark Slee | 2f6404d | 2006-10-10 01:37:40 +0000 | [diff] [blame] | 279 | // Go into read mode |
| 280 | void setRead() { |
| 281 | setFlags(EV_READ | EV_PERSIST); |
| 282 | } |
| 283 | |
| 284 | // Go into write mode |
| 285 | void setWrite() { |
| 286 | setFlags(EV_WRITE | EV_PERSIST); |
| 287 | } |
| 288 | |
Mark Slee | 402ee28 | 2007-08-23 01:43:20 +0000 | [diff] [blame] | 289 | // Set socket idle |
| 290 | void setIdle() { |
| 291 | setFlags(0); |
| 292 | } |
| 293 | |
Mark Slee | 2f6404d | 2006-10-10 01:37:40 +0000 | [diff] [blame] | 294 | // Set event flags |
| 295 | void setFlags(short eventFlags); |
| 296 | |
| 297 | // Libevent handlers |
| 298 | void workSocket(); |
| 299 | |
| 300 | // Close this client and reset |
| 301 | void close(); |
| 302 | |
| 303 | public: |
| 304 | |
| 305 | // Constructor |
Aditya Agarwal | 9abb0d6 | 2007-01-24 22:53:54 +0000 | [diff] [blame] | 306 | TConnection(int socket, short eventFlags, TNonblockingServer *s) { |
David Reiss | d7a16f4 | 2008-02-19 22:47:29 +0000 | [diff] [blame] | 307 | readBuffer_ = (uint8_t*)std::malloc(1024); |
Mark Slee | 2f6404d | 2006-10-10 01:37:40 +0000 | [diff] [blame] | 308 | if (readBuffer_ == NULL) { |
T Jake Luciani | b5e6221 | 2009-01-31 22:36:20 +0000 | [diff] [blame] | 309 | throw new apache::thrift::TException("Out of memory."); |
Mark Slee | 2f6404d | 2006-10-10 01:37:40 +0000 | [diff] [blame] | 310 | } |
| 311 | readBufferSize_ = 1024; |
Mark Slee | 79b1694 | 2007-11-26 19:05:29 +0000 | [diff] [blame] | 312 | |
Kevin Clark | 5ace178 | 2009-03-04 21:10:58 +0000 | [diff] [blame] | 313 | numReadsSinceReset_ = 0; |
| 314 | numWritesSinceReset_ = 0; |
| 315 | |
Mark Slee | 2f6404d | 2006-10-10 01:37:40 +0000 | [diff] [blame] | 316 | // Allocate input and output tranpsorts |
Mark Slee | 79b1694 | 2007-11-26 19:05:29 +0000 | [diff] [blame] | 317 | // these only need to be allocated once per TConnection (they don't need to be |
Aditya Agarwal | 1ea9052 | 2007-01-19 02:02:12 +0000 | [diff] [blame] | 318 | // reallocated on init() call) |
Mark Slee | 5ea15f9 | 2007-03-05 22:55:59 +0000 | [diff] [blame] | 319 | inputTransport_ = boost::shared_ptr<TMemoryBuffer>(new TMemoryBuffer(readBuffer_, readBufferSize_)); |
| 320 | outputTransport_ = boost::shared_ptr<TMemoryBuffer>(new TMemoryBuffer()); |
Mark Slee | 79b1694 | 2007-11-26 19:05:29 +0000 | [diff] [blame] | 321 | |
Mark Slee | 2f6404d | 2006-10-10 01:37:40 +0000 | [diff] [blame] | 322 | init(socket, eventFlags, s); |
David Reiss | 1997f10 | 2008-04-29 00:29:41 +0000 | [diff] [blame] | 323 | server_->incrementNumConnections(); |
| 324 | } |
| 325 | |
| 326 | ~TConnection() { |
David Reiss | c17fe6b | 2008-04-29 00:29:43 +0000 | [diff] [blame] | 327 | server_->decrementNumConnections(); |
Mark Slee | 2f6404d | 2006-10-10 01:37:40 +0000 | [diff] [blame] | 328 | } |
| 329 | |
| 330 | // Initialize |
| 331 | void init(int socket, short eventFlags, TNonblockingServer *s); |
| 332 | |
| 333 | // Transition into a new state |
| 334 | void transition(); |
| 335 | |
| 336 | // Handler wrapper |
Mark Slee | a8de489 | 2008-02-09 00:02:26 +0000 | [diff] [blame] | 337 | static void eventHandler(int fd, short /* which */, void* v) { |
Mark Slee | e02385b | 2007-06-09 01:21:16 +0000 | [diff] [blame] | 338 | assert(fd == ((TConnection*)v)->socket_); |
Mark Slee | 2f6404d | 2006-10-10 01:37:40 +0000 | [diff] [blame] | 339 | ((TConnection*)v)->workSocket(); |
| 340 | } |
Mark Slee | 79b1694 | 2007-11-26 19:05:29 +0000 | [diff] [blame] | 341 | |
Mark Slee | e02385b | 2007-06-09 01:21:16 +0000 | [diff] [blame] | 342 | // Handler wrapper for task block |
Mark Slee | a8de489 | 2008-02-09 00:02:26 +0000 | [diff] [blame] | 343 | static void taskHandler(int fd, short /* which */, void* v) { |
Mark Slee | e02385b | 2007-06-09 01:21:16 +0000 | [diff] [blame] | 344 | assert(fd == ((TConnection*)v)->taskHandle_); |
| 345 | if (-1 == ::close(((TConnection*)v)->taskHandle_)) { |
David Reiss | 01e55c1 | 2008-07-13 22:18:51 +0000 | [diff] [blame] | 346 | GlobalOutput.perror("TConnection::taskHandler close handle failed, resource leak ", errno); |
Mark Slee | e02385b | 2007-06-09 01:21:16 +0000 | [diff] [blame] | 347 | } |
| 348 | ((TConnection*)v)->transition(); |
| 349 | } |
| 350 | |
Mark Slee | 2f6404d | 2006-10-10 01:37:40 +0000 | [diff] [blame] | 351 | }; |
| 352 | |
T Jake Luciani | b5e6221 | 2009-01-31 22:36:20 +0000 | [diff] [blame] | 353 | }}} // apache::thrift::server |
Mark Slee | 2f6404d | 2006-10-10 01:37:40 +0000 | [diff] [blame] | 354 | |
| 355 | #endif // #ifndef _THRIFT_SERVER_TSIMPLESERVER_H_ |