proto-socket/go
toki c9d21b9888 feat: add DisconnectInfo and fix stale heartbeat wait-timer race
Introduce DisconnectInfo with reason/error so consumers can distinguish
heartbeat timeouts from remote close, write errors, and parse failures.
Wire reasons through TCP/WS read and write paths.

Fix the heartbeat wait-timer to re-check waitingHBResponse when firing:
in paired idle (both peers heartbeat in the same cycle) the response
could arrive while the wait timer was being installed, causing a stale
disconnect. The timer now re-arms the interval instead of disconnecting
when the response was already observed.

Add regression tests: TestHeartbeatSurvivesPairedIdle, and assert
DisconnectInfo.Reason == heartbeat_timeout in the legitimate timeout
tests for both TCP and WebSocket.
2026-05-17 17:37:43 +09:00
..
crosstest chore: update go.mod dependency version 2026-05-02 07:00:05 +09:00
examples chore: update go.mod dependency version 2026-05-02 07:00:05 +09:00
packets chore: update go.mod dependency version 2026-05-02 07:00:05 +09:00
test feat: add DisconnectInfo and fix stale heartbeat wait-timer race 2026-05-17 17:37:43 +09:00
base_client.go feat: add DisconnectInfo and fix stale heartbeat wait-timer race 2026-05-17 17:37:43 +09:00
communicator.go refactor: rename toki_socket to proto_socket across all languages 2026-05-02 07:19:12 +09:00
communicator_nonce_test.go refactor: rename toki_socket to proto_socket across all languages 2026-05-02 07:19:12 +09:00
go.mod chore: update go.mod dependency version 2026-05-02 07:00:05 +09:00
go.sum feat: add WebSocket/WSS support and Go implementation 2026-04-11 08:33:46 +09:00
heartbeat_timer.go refactor: rename toki_socket to proto_socket across all languages 2026-05-02 07:19:12 +09:00
tcp_client.go feat: add DisconnectInfo and fix stale heartbeat wait-timer race 2026-05-17 17:37:43 +09:00
tcp_server.go refactor: rename toki_socket to proto_socket across all languages 2026-05-02 07:19:12 +09:00
ws_client.go feat: add DisconnectInfo and fix stale heartbeat wait-timer race 2026-05-17 17:37:43 +09:00
ws_server.go refactor: rename toki_socket to proto_socket across all languages 2026-05-02 07:19:12 +09:00