Depending on the entitlements, streaming service users are able to connect with 1 or more connections using same auth id (same auth token, same sid or same wmid), so streaming service has a mechanism to calculate current number of connections per session and allow/reject connections over the limit - connection count strategies.
Currently there are 2 strategies:
- Rollover connection count
- Rejecting connection count
Clients can decide which strategy to use by setting the rejectExcessiveConnection flag to true to use the rejecting connection count strategy or false to use rollover connection count strategy.
Rollover Connection Count Strategy
This strategy is used by default if the flag wasn't set or is null.
When new connection arrives and connection limit is reached, this strategy closes the oldest connection for this auth id with code 452 and description "Connection Limit Exceeded"
Rejecting Connection Count Strategy
When new connection arrives and the connection limit is reached, this strategy rejects the connection by throwing a NotAuthorizedException which results in a connect response code 401 and a reason of "Unauthorized"
Additional points:
- The rejectExcessiveConnection flag value is saved during the first connection attempt to a server
- For any further attempts to change the flag value (connect with a different flag value), if at least one connection is still active for this auth id, the attempt will be ignored
- The current flag value is returned in connection response