Repository navigation
Support the TCP and WebSocket parameters of rcssserver 20 - #121
Merged
Merged
Conversation
rcssserver 20 で追加された TCP・WebSocket 用のサーバパラメータ (tcp_port, tcp_coach_port, tcp_olcoach_port, ws_port, ws_allowed_origins) を読めるようにした。通信の改修は別に行う。 - ServerParam に取得関数を追加。TCP のポートが -1 のときは対応する UDP のポート番号を返す - rcg::ServerParamT にも追加し、rcssserver 20 の rcg を警告なしで読めるようにした - 単体テスト run_test_server_param を追加 (CMake・Autotools) - CMake の単体テストを、ビルドしたライブラリを指す LD_LIBRARY_PATH で実行するようにした - 計画書を追加し、リリースノートと docs/build.md を更新 Read the server parameters for TCP and WebSocket added in rcssserver 20 (tcp_port, tcp_coach_port, tcp_olcoach_port, ws_port, ws_allowed_origins). The network itself will be updated separately. - Add the accessors to ServerParam. A TCP port of -1 returns the matching UDP port number. - Add them to rcg::ServerParamT, so the rcg files of rcssserver 20 are read without warnings. - Add the unit test run_test_server_param (CMake and Autotools). - Run the CMake unit tests with LD_LIBRARY_PATH set to the built library. - Add the plan, and update the release notes and docs/build.md.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
rcssserver 20 adds five server parameters for the TCP and WebSocket connections:
tcp_port,tcp_coach_port,tcp_olcoach_port,ws_portandws_allowed_origins.This PR makes librcsc read them. The clients of librcsc still connect with UDP;
the network will be updated in a separate PR.
rcssserver does not send these parameters to players and coaches,
but writes them to the game log (rcg) and sends them to monitors.
Changes
rcsc::ServerParam: new accessorstcpPlayerPort(),tcpTrainerPort(),tcpOnlineCoachPort(),wsPort()andwsAllowedOrigins().0 means disabled. A TCP port of -1 returns the matching UDP port number, as rcssserver does.
rcsc::rcg::ServerParamT: new members for the five parameters, converted byServerParam::convertFrom()/convertTo().Before this change, reading an rcg of rcssserver 20 printed
Unsupported parameter.with the wholeserver_paramlinefor each new parameter, and the values did not reach
ServerParam.run_test_server_param(CppUnit, CMake and Autotools).LD_LIBRARY_PATHset to the library in the build tree.Otherwise, an installed librcsc in
LD_LIBRARY_PATH(e.g.~/.local/lib) was tested instead of the built one.docs/plan/2026-11-24-00_tcp-ws-params.md. Release notes anddocs/build.mdare updated.Compatibility
The layouts of
rcsc::ServerParamandrcsc::rcg::ServerParamTare changed.The library version 20 is not released yet, so the SOVERSION is not changed.
Programs built with librcsc of the develop branch before this change must be rebuilt.
Tests
./cmake-helper.sh test).make checkandmake distcheckwith--enable-unit-testpass.