Add Test ffor SRTO_STREAMID

This commit is contained in:
Morpheus235 2022-01-19 06:29:51 +01:00 • committed by GitHub
parent d0610368f5
commit 64076e370f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -41,6 +41,19 @@ describe("Async SRT API with callbacks", () => {
});
});
it("can set SRT sockopt SRTO_STREAMID", done => {
const asyncSrt = new AsyncSRT();
asyncSrt.createSocket(false, (socket) => {
asyncSrt.setSockOpt(socket, SRT.SRTO_STREAMID, "STREAMID", (result) => {
expect(result).not.toEqual(SRT.ERROR);
asyncSrt.getSockOpt(socket, SRT.SRTO_STREAMID, (value) => {
expect(value).toEqual("STREAMID");
done();
});
});
});
});
it("can set SRT socket in non-blocking mode", done => {
const asyncSrt = new AsyncSRT();
asyncSrt.createSocket(false, (socket) => {