blob: f8ff84721224a7248d4415c88bb3239dc0aee4b6 [file] [log] [blame]
Mark Sleee8540632006-05-30 09:24:40 +00001#ifndef T_DISPATCHER_H
2#define T_DISPATCHER_H
3
4#include <string>
5
6/**
7 * A dispatcher is a generic object that accepts an input buffer and returns
8 * a buffer. It can be used in a variety of ways, i.e. as a client that
9 * sends data over the network and returns a response, or as a server that
10 * reads an input and returns an output.
11 *
12 * @author Mark Slee <mcslee@facebook.com>
13 */
14class TDispatcher {
15 public:
16 virtual ~TDispatcher() {};
17 virtual std::string dispatch(const std::string& s) = 0;
18 protected:
19 TDispatcher() {}
20};
21
22#endif