mirror of
https://github.com/ossrs/srs.git
synced 2025-02-15 04:42:04 +00:00
Cover protocol stack RTMP. 3.0.63
This commit is contained in:
parent
ce8f778fe6
commit
466f99a1c8
1 changed files with 22 additions and 0 deletions
|
@ -333,6 +333,28 @@ VOID TEST(ProtoStackTest, HugeMessages)
|
||||||
HELPER_EXPECT_SUCCESS(p.send_and_free_messages(msgs, 1024, 1));
|
HELPER_EXPECT_SUCCESS(p.send_and_free_messages(msgs, 1024, 1));
|
||||||
EXPECT_EQ(269*1024, io.out_buffer.length());
|
EXPECT_EQ(269*1024, io.out_buffer.length());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (true) {
|
||||||
|
MockBufferIO io;
|
||||||
|
SrsProtocol p(&io);
|
||||||
|
|
||||||
|
SrsCommonMessage pkt;
|
||||||
|
pkt.header.initialize_audio(200, 1000, 1);
|
||||||
|
pkt.create_payload(256);
|
||||||
|
pkt.size = 256;
|
||||||
|
|
||||||
|
SrsSharedPtrMessage* msg = new SrsSharedPtrMessage();
|
||||||
|
msg->create(&pkt);
|
||||||
|
SrsAutoFree(SrsSharedPtrMessage, msg);
|
||||||
|
|
||||||
|
SrsSharedPtrMessage* msgs[10240];
|
||||||
|
for (int i = 0; i < 10240; i++) {
|
||||||
|
msgs[i] = msg->copy();
|
||||||
|
}
|
||||||
|
|
||||||
|
HELPER_EXPECT_SUCCESS(p.send_and_free_messages(msgs, 10240, 1));
|
||||||
|
EXPECT_EQ(269*10240, io.out_buffer.length());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID TEST(ProtoStackTest, DecodeMessages)
|
VOID TEST(ProtoStackTest, DecodeMessages)
|
||||||
|
|
Loading…
Reference in a new issue