blob: 9562d9fc39a6a363c0df6a2d74711e26f1483bda [file] [log] [blame]
#ifndef T_NULL_TRANSPORT
#define T_NULL_TRANSPORT
#include "transport/TTransport.h"
/**
* The null transport is a dummy transport that doesn't actually do anything.
* It's sort of an analogy to /dev/null, you can never read anything from it
* and it will let you write anything you want to it, though it won't actually
* go anywhere.
*
* @author Mark Slee <mcslee@facebook.com>
*/
class TNullTransport : public TTransport {
public:
TNullTransport() {}
~TNullTransport() {}
bool isOpen() { return true; }
void open() { }
void write(const std::string& s) {}
};
#endif