9 Commits
Author SHA1 Message Date
copilot-swe-agent[bot]anddalbodeule 446a265fa2 Improve code readability in client stream frame handlers
- Extract stream IDs before logging calls for better readability
- Remove unnecessary anonymous functions
- Address code review feedback

Co-authored-by: dalbodeule <11470513+dalbodeule@users.noreply.github.com>
2025-12-09 14:46:00 +00:00
copilot-swe-agent[bot]anddalbodeule 56916c75f4 Fix client handling of unexpected stream frames at top level
- Add handling for StreamData and StreamClose at top level in client StartLoop
- Log warning and continue instead of crashing on unexpected frames
- Fixes "unsupported envelope type stream_close" error when frames arrive out of order

Co-authored-by: dalbodeule <11470513+dalbodeule@users.noreply.github.com>
2025-12-09 14:44:31 +00:00
copilot-swe-agent[bot]anddalbodeule 887c5fcdff Address code review feedback: cleanup unused code and improve channel safety
- Remove unused streamResponse struct
- Add named constant for response channel buffer size
- Add default case to prevent blocking in readLoop select
- Fix potential double-close of channels during cleanup
- Improve comments explaining concurrency patterns

Co-authored-by: dalbodeule <11470513+dalbodeule@users.noreply.github.com>
2025-12-09 14:24:56 +00:00
copilot-swe-agent[bot]anddalbodeule ff38ef2828 Fix concurrent request handling with stream multiplexing
- Add channel-based multiplexing to handle concurrent HTTP requests
- Implement background readLoop to dispatch responses to correct streams
- Remove mutex bottleneck that was serializing all requests
- Fixes "unexpected stream_data/stream_open for id" errors with concurrent requests

Co-authored-by: dalbodeule <11470513+dalbodeule@users.noreply.github.com>
2025-12-09 14:22:29 +00:00
copilot-swe-agent[bot]anddalbodeule 1292df33e5 Fix DTLS buffer size issue by wrapping sessions with buffered readers
- Add dtlsReadBufferSize constant (8KB) matching pion/dtls limits
- Wrap DTLS sessions with bufio.Reader in client and server code
- Update tests to use buffered readers for datagram-based connections
- All tests passing successfully

Co-authored-by: dalbodeule <11470513+dalbodeule@users.noreply.github.com>
2025-12-09 14:07:15 +00:00
copilot-swe-agent[bot] 412b59f420 Initial plan 2025-12-09 13:59:02 +00:00
copilot-swe-agent[bot]anddalbodeule a00c001b49 Improve test documentation for mock datagram connection
Co-authored-by: dalbodeule <11470513+dalbodeule@users.noreply.github.com>
2025-12-09 10:51:44 +00:00
copilot-swe-agent[bot]anddalbodeule 76423627e9 Fix DTLS protobuf codec framing for datagram boundaries
- Modified protobufCodec.Encode() to combine length prefix and protobuf data into a single buffer and write in one call
- Modified protobufCodec.Decode() to read entire datagram in a single Read call
- Added comprehensive tests for datagram-based codec behavior
- Fixes issue #17: proto: cannot parse invalid wire-format data error in DTLS

Co-authored-by: dalbodeule <11470513+dalbodeule@users.noreply.github.com>
2025-12-09 10:49:37 +00:00
copilot-swe-agent[bot] 9a70256d89 Initial plan 2025-12-09 10:44:22 +00:00