Repository navigation
Conversation
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
jkim89
marked this pull request as ready for review
October 27, 2026 22:48
jkim89
force-pushed
the
jonghyunk/pr01-wire-codec
branch
from
October 30, 2026 19:12
fe5f90f to
6452f88
Compare
jkim89
force-pushed
the
jonghyunk/pr03-websocket-transport
branch
from
October 30, 2026 19:12
7ea56d3 to
2aaf4b2
Compare
Sessions talk to the bridge through ITransport, which sends and receives complete wire frames. TcpTransport frames them over one TCP connection (TcpSocket owns the POSIX socket, timeouts and buffer sizes); WebSocketTransport carries exactly one frame per RFC 6455 binary message (no TLS; terminate wss:// in a proxy). parse_remote() and connect_transport() turn --remote=<host:port> or ws://host:port[/path] into a connected transport. The TCP seam has no test file of its own, so it ships with the WebSocket transport and its tests. Signed-off-by: Jonghyun Kim <jonghyunk@nvidia.com>
pr01's codec became remote_plugin_protocol (protocol_frame.hpp / protocol_payloads.hpp): the transports include protocol_frame.hpp and use protocol::kHeaderSize, protocol::decode_header and protocol::DecodeError through a namespace alias. The session CMake and AGENTS.md conflicts are resolved onto the split file names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Jonghyun Kim <jonghyunk@nvidia.com>
Applied the fact-checked (VERIFIED) findings on code this branch adds:
- TcpSocket: setsockopt failures (TCP_NODELAY, SO_SNDTIMEO, SO_REUSEADDR)
throw with errno; connect/listen attempts throw their reason instead of
bool + out-param, including a failed socket(); addrinfo is held by a
unique_ptr; parse_endpoint accepts [v6]:port and bare v6 hosts and
rejects trailing garbage ("80x"); EAGAIN branches that a blocking socket
cannot hit are gone; the once-per-process buffer-size log is dropped
(and with it the log_bridge link).
- TcpTransport moves to tcp_transport.{hpp,cpp}; parse_remote and
connect_transport move to remote_address.{hpp,cpp}; RemoteAddress
carries std::optional ws_path instead of bool + path.
- accept() reports the peer through TcpSocket::accept, so the two
transports' accept functions no longer copy each other.
- One kMidMessageStall and one kConnectTimeout in transport.hpp.
- WebSocket: named header-bit constants; protocol violations (unmasked
client frame, RSV bits, oversized control frame, text/unknown opcodes)
are Malformed, not Closed; the client upgrade error says what failed;
the Host value is named host_header.
- Threads is linked by the test that spawns them, not the library.
- Tests: TcpTransport::receive cases, invalid/IPv6 endpoint cases,
wait_ready drives the server handshake, kHeaderSize instead of 24.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jonghyun Kim <jonghyunk@nvidia.com>
Applied the fact-checked (VERIFIED) findings on code this branch adds: - TcpSocket::recv_all returns ReceiveResult (its Ok/Timeout/Closed subset), so TcpTransport no longer maps one enum onto the other; peer_name() is private; a failed connect/listen reports every address's error. - parse_endpoint moves to remote_address.hpp with parse_remote, and parses the port with std::from_chars; the Host header brackets IPv6 hosts. - WebSocketTransport: an explicit server constructor and a client connect() factory replace the role flag plus client-only defaults. - One accept_transport<T> helper instead of two copies of accept. - WebSocket: reserved control opcodes are Malformed; starts_with instead of rfind(..., 0). - TcpTransport::receive drops a check recv_all already covers; kSendTimeout says why it is independent of the other 3 s constants. - Tests: oversized and reserved-opcode WebSocket cases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Jonghyun Kim <jonghyunk@nvidia.com>
Applied the fact-checked (VERIFIED) findings on code this branch adds: - WebSocketTransport's client role is a constructor that performs the upgrade and throws, instead of a connect() factory plus a second step. - A failed PONG send in receive() reports Closed instead of being ignored. - send_all drops a check for a zero-byte send() of a non-empty buffer. - parse_remote/parse_endpoint and TcpTransport tests move to test_remote_address.cpp and test_tcp_transport.cpp. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Jonghyun Kim <jonghyunk@nvidia.com>
jkim89
force-pushed
the
jonghyunk/pr01-wire-codec
branch
from
October 30, 2026 21:42
6452f88 to
c43a9c9
Compare
jkim89
force-pushed
the
jonghyunk/pr03-websocket-transport
branch
from
October 30, 2026 21:42
2aaf4b2 to
506f44a
Compare
Contributor
Author
This branch was successfully deployed
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
Transport layer for the remote plugin session: an
ITransportseam with TCP and WebSocket implementations.What changes
ITransport(send/receive complete wire frames)TcpSocket/TcpTransport(POSIX, timeouts, buffer sizes)WebSocketTransport(one frame per RFC 6455 binary message, no TLS — terminate wss:// in a proxy)parse_remote()/connect_transport()for--remote=<host:port>orws://host:port[/path]isaaccapture::LoggerWhat does not change
Wire format, plugins, runtime behavior. The planned separate TCP-seam PR is folded in here because it has no tests of its own.
Testing
test_websocket_transport.cpp(5 cases: URL parsing, every length class, control frames/fragments, bad handshakes,connect_transport). Fresh build: ctest 271/271.Depends on
#1321