🌊 Enable restricting max bandwidth of incoming streams #80
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #42
This change introduces the
FTL_MAX_ALLOWED_BITS_PER_SECOND
configuration, providing a means of restricting the maximum bandwidth any given stream is allowed to consume before it is kicked off the server.There are a few other changes in this payload as well:
FtlControlConnection::FtlResponseCode
enum is introduced (from ftl-sdk), and is now referenced instead of hard-coded string values throughoutFtlControlConnection
.NetworkSocketConnectionTransport
's stopping procedure to prevent getting into a deadlocked state if the server is trying to stop a stream around the same time a client is.An issue #79 was also discovered where pending writes to a
NetworkSocketConnectionTransport
aren't flushed when the connection is stopped, preventing us from communicating the response code to the client before closing the connection.Worth noting as well is that OBS behavior when a stream connection is terminated (even with a valid error response) is to reconnect every ten seconds, regardless of the error received. The net user result is OBS transparently trying to reconnect in a loop despite the server kicking them off for excessive bandwidth use.