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:
parent
cf9a6b4f48
commit
8c214dc967
1 changed files with 26 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue