Skip to content

Align Caller/Callee roles with TCP connection roles#46

Merged
General-Fault merged 1 commit into
mainfrom
cbarn/45-align-caller-callee-roles
Jun 3, 2026
Merged

Align Caller/Callee roles with TCP connection roles#46
General-Fault merged 1 commit into
mainfrom
cbarn/45-align-caller-callee-roles

Conversation

@General-Fault
Copy link
Copy Markdown
Owner

What

Caller now acts as TCP client (connects, sends offer). Callee now acts as TCP server (listens, answers offer).

This aligns WebRTC semantics with transport semantics, fixing the inverted role mapping in BasicVideoChat.

Why

The previous mapping confused the example:

  • Glossary defined Caller as offer-sender (W3C spec)
  • Code had Caller as TCP listener (opposite of TCP client semantics)

This design decision is documented in ADR-0002.

Changes

  • MainWindow.xaml.cs: Flipped TCP calls and UI logic, updated status messages
  • TcpSignalingChannel.cs: Corrected role terminology in comments
  • CONTEXT.md: Clarified Host/role distinction
  • docs/adr/0002-caller-callee-tcp-alignment.md: New design rationale

Fixes #45

The Caller now acts as TCP client (connects, sends offer).
The Callee now acts as TCP server (listens, answers offer).

This aligns WebRTC semantics with transport semantics, eliminating
confusion in BasicVideoChat where roles were previously inverted.

Changes:
- Flip UI IP enable/disable logic (Caller: enabled, Callee: disabled)
- Swap TCP calls: Caller uses ConnectAsync, Callee uses ListenAsync
- Update status messages to reflect actual TCP operations
- Clarify TcpSignalingChannel comments with correct role mapping
- Update CONTEXT.md glossary with Host/role distinction notes

Documented in ADR-0002: Caller and Callee roles align with TCP
connection roles.

Fixes #45
@General-Fault General-Fault merged commit 40d7794 into main Jun 3, 2026
1 check failed
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.

BasicVideoChat: Caller and Callee roles should align with TCP connection roles

1 participant