blob: a1f43d4bbe70d79c7eb3ca1311db0daae0ed320e [file] [log] [blame]
#ifndef T_TRANSPORT_H
#define T_TRANSPORT_H
#include <string>
/**
* Generic interface for a method of transporting data.
*
* @author Mark Slee <mcslee@facebook.com>
*/
class TTransport {
public:
virtual ~TTransport() {};
virtual bool open() = 0;
virtual void close() = 0;
virtual int read (std::string& s, uint32_t size) = 0;
virtual void write(const std::string& s) = 0;
protected:
TTransport() {};
};
#endif