Fix wsscp C implementation hang issues

- Fix critical WebSocket frame parsing bug: signed char causing negative payload lengths
- Add comprehensive message type handling for tunnel_response, tunnel_request, tunnel_ack
- Implement buffered data transmission to prevent data loss from blocking sends
- Add frame processing safeguards to prevent infinite loops
- Optimize performance with increased sleep times to reduce CPU usage
- Clean up inappropriate debug output from utility functions
- Add proper resource management and error handling throughout

Root causes fixed:
1. Signed/unsigned char bug in frame length calculation
2. Missing tunnel_response message handling breaking SSH protocol
3. Data loss from non-blocking socket operations
4. Infinite loops from malformed frame processing
5. High CPU usage from short sleep intervals

The C implementation now properly handles WebSocket frames of all sizes and maintains SSH protocol data integrity.
parent bc0d305a
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment