-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Block clients from connecting to RTMPServer #890
Comments
Adding some more context, if you use the RTMP.Source/SourceBin, and you curl the RTMP port (just open a TCP connection and close it basically), the element is going to crash as the If you use the plain RTMP.Source element (because you want to handle FLV demuxing by yourself for example), everything also falls apart when you try to open 2 valid RTMP connections. The listener is going to accept it, then everything breaks. I think right now the implementation is kind of broken. I think there are two usecases to address:
I don't see any other usecase. While we discuss (cc @varsill), I'm going to work on 2. |
Hello! I agree with you, @dmorn that these are two valid use cases. The first one is meant to be usually solved with an |
Hey folks, I wondered whether it's possible to block new clients from connecting to a RTMPServer if they - for example - don't have a valid
stream_key
. This would be important to me to prevent illegal streams to my server.What I currently do is to implement my own
ClientHandler
(just a copy of theClientHandlerImpl
module) which returnsnil
fromhandle_stream_published
if the stream_key is invalid. This doesn't prevent the client from connecting, but it breaks the state of the ClientHandler which leads to an exception in the next callback and to the disconnection of the client.It would be nicer though to be able to control the connection e.g. in the
handle_new_client
callback instead. I would like to return something like{:stop, message}
to decline the connection.Thanks for your much appreciated help in advance :)
The text was updated successfully, but these errors were encountered: