1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

refine utest, move the mock io to handshake where actually use it.

This commit is contained in:
winlin 2014-06-08 12:29:05 +08:00
parent 94cf0c1069
commit 7c7920698d
4 changed files with 91 additions and 91 deletions

View file

@ -49,34 +49,4 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// * {ASSERT|EXPECT}_DOUBLE_EQ(expected, actual): Tests that two double values are almost equal.
// * {ASSERT|EXPECT}_NEAR(v1, v2, abs_error): Tests that v1 and v2 are within the given distance to each other.
#include <srs_protocol_io.hpp>
class MockEmptyIO : public ISrsProtocolReaderWriter
{
public:
MockEmptyIO();
virtual ~MockEmptyIO();
// for protocol
public:
virtual bool is_never_timeout(int64_t timeout_us);
// for handshake.
public:
virtual int read_fully(void* buf, size_t size, ssize_t* nread);
virtual int write(void* buf, size_t size, ssize_t* nwrite);
// for protocol
public:
virtual void set_recv_timeout(int64_t timeout_us);
virtual int64_t get_recv_timeout();
virtual int64_t get_recv_bytes();
// for protocol
public:
virtual void set_send_timeout(int64_t timeout_us);
virtual int64_t get_send_timeout();
virtual int64_t get_send_bytes();
virtual int writev(const iovec *iov, int iov_size, ssize_t* nwrite);
// for protocol/amf0/msg-codec
public:
virtual int read(void* buf, size_t size, ssize_t* nread);
};
#endif