openfresh / gosrt

Go SRT library with the net package like API.
MIT License
66 stars 16 forks source link

How to add a callback to authorize streams #5

Closed mauricioabreu closed 4 years ago

mauricioabreu commented 4 years ago

Thank for this library!

This is not a real issue but a question: How can I add authorization using this library? I got it working using C but the SRT C API has a callback to pass to the listen function.

https://github.com/Haivision/srt/blob/master/docs/AccessControl.md#example

thmatuza commented 4 years ago

Hi! I am sorry for late response. I just added code for AccessControl to an example program. https://github.com/openfresh/gosrt/pull/8/files

mauricioabreu commented 4 years ago

Thank you @thmatuza have a nice day!

thmatuza commented 4 years ago

@mauricioabreu I am sorry my previous code was not enough for AccessControl. It could get streamid but cannot set passphrase before establishing connection.

I just fixed it on this pull request. https://github.com/openfresh/gosrt/pull/9