#ifndef ISOCKETCONNECTION_H_ #define ISOCKETCONNECTION_H_ #include class ISocketConnection { public: ISocketConnection() {} virtual ~ISocketConnection() {} virtual void write(int i) = 0; virtual unsigned char read() = 0; virtual void flush() = 0; virtual void write(const std::vector& b, int length) = 0; virtual void write(const std::vector& bytes, int offset, int length) = 0; virtual int read(unsigned char*, int length) = 0; virtual int read(std::vector& b, int off, int length) = 0; virtual void makeNonBlock() = 0; virtual int waitForRead() = 0; virtual void forceShutdown() = 0; virtual void dump(const void *buf, int length) = 0; virtual void log(const char *str) = 0; }; #endif /* ISOCKETCONNECTION_H_ */