1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-14 20:31:56 +00:00

Cover protocol stack RTMP. 3.0.63

This commit is contained in:
winlin 2019-10-28 08:57:11 +08:00
parent cf9a6b4f48
commit 8c214dc967

View file

@ -147,5 +147,31 @@ VOID TEST(ProtoStackTest, ManualFlush)
HELPER_EXPECT_SUCCESS(p.manual_response_flush());
EXPECT_EQ(12+6, io.out_buffer.length());
}
if (true) {
MockBufferIO io;
SrsProtocol p(&io);
// Always response ACK message.
HELPER_EXPECT_SUCCESS(p.set_in_window_ack_size(1));
// When not auto response, need to flush it manually.
p.set_auto_response(false);
HELPER_EXPECT_SUCCESS(p.response_ping_message(1024));
EXPECT_EQ(0, io.out_buffer.length());
// If not flushed, the packets will be destroyed.
}
if (true) {
MockBufferIO io;
SrsProtocol p(&io);
p.set_recv_buffer(0);
p.set_recv_buffer(131072 * 10);
p.set_merge_read(true, NULL);
p.set_merge_read(false, NULL);
}
}