mirror of
https://github.com/ossrs/srs.git
synced 2025-11-24 11:54:21 +08:00
This PR consolidates the SRT and RTC server functionality into the main SrsServer class, eliminating the separate `SrsSrtServer` and `SrsRtcServer` classes and their corresponding adapter classes. This architectural change simplifies the codebase by removing the hybrid server pattern and integrating all protocol handling directly into `SrsServer`. As unified connection manager (`_srs_conn_manager`) for all protocol connections, all incoming connections are checked against the same connection limit in `on_before_connection()`. This enables consistent connection limits: `max_connections` now protects against resource exhaustion from any protocol, not just RTMP. Remove modules because it's not used now, so only keep the server application module and main entry point. Remove the wait group to run server, instead, directly run server and invoke the cycle method. After this PR, the startup workflow and servers architecture should be much easier to maintain. --------- Co-authored-by: OSSRS-AI <winlinam@gmail.com>