Skip to content

Support the TCP and WebSocket parameters of rcssserver 20 - #121

Merged
hidehisaakiyama merged 2 commits into
developfrom
feature/tcp-ws-params
Nov 23, 2026
Merged

hidehisaakiyama merged 2 commits into
developfrom
feature/tcp-ws-params

Conversation

@hidehisaakiyama

Copy link
Copy Markdown
Member

Summary

rcssserver 20 adds five server parameters for the TCP and WebSocket connections:
tcp_port, tcp_coach_port, tcp_olcoach_port, ws_port and ws_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 accessors tcpPlayerPort(), tcpTrainerPort(), tcpOnlineCoachPort(), wsPort() and wsAllowedOrigins().
    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 by ServerParam::convertFrom() / convertTo().
    Before this change, reading an rcg of rcssserver 20 printed Unsupported parameter. with the whole server_param line
    for each new parameter, and the values did not reach ServerParam.
  • New unit test run_test_server_param (CppUnit, CMake and Autotools).
  • The CMake unit tests are run with LD_LIBRARY_PATH set 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.
  • Plan: docs/plan/2026-11-24-00_tcp-ws-params.md. Release notes and docs/build.md are updated.

Compatibility

The layouts of rcsc::ServerParam and rcsc::rcg::ServerParamT are 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: all 15 tests pass (./cmake-helper.sh test).
  • Autotools: make check and make distcheck with --enable-unit-test pass.

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.
計画書に PR #121 と CI の結果を記録し、ステータスを完了にした。

Record PR #121 and the CI results in the plan, and mark it as completed.
@hidehisaakiyama
hidehisaakiyama merged commit 4a344df into develop Nov 23, 2026
5 checks passed
@hidehisaakiyama
hidehisaakiyama deleted the feature/tcp-ws-params branch November 23, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant