Commit Graph

9 Commits

Author SHA1 Message Date
6893eadd04 Improve WebSocket receive buffer handling
Refactored TrySendAndReceiveAsync to use a fixed-size buffer for I/O and dynamically accumulate received data chunks until EndOfMessage. This prevents truncation of large messages and ensures the entire payload is received before decoding.
2025-08-14 04:21:02 +09:00
e1d90cde18 Improve WebSocket receive to handle multi-frame messages
The receive logic now accumulates all frames until EndOfMessage, ensuring complete messages are read even if fragmented. This change improves reliability when handling large or fragmented WebSocket messages.
2025-08-14 04:01:02 +09:00
ae7f79aeb8 Update WebSocketManager.cs 2025-08-05 05:01:54 +09:00
57fae72f42 Refactor WebSocketManager for improved clarity and reliability
Renamed internal classes and fields for clarity, added comments, and refactored SendAndReceiveAsync to use a helper method and a retry mechanism. Improved resource cleanup and error handling for stale sockets. These changes enhance code readability and robustness in WebSocket connection management.
2025-08-05 04:33:18 +09:00
b33069fc9e Update WebSocketManager.cs 2025-08-05 04:26:30 +09:00
f9c265b08a Use MD5 hash for WebSocket connection keys
Replaces the plain concatenation of host, port, and path with an MD5 hash to generate unique keys for WebSocket connections. This improves key uniqueness and prevents potential issues with special characters in the key string.
2025-07-31 17:28:26 +09:00
92a35606ed Improve XML escaping, WebSocket buffer, and editor style
Replaced HTML encoding with SecurityElement.Escape for XML escaping in ChromiumDevTools. Made WebSocketManager's receive buffer size configurable with a default of 65536 bytes. Updated editor.html to use 'color: inherit' for banner link hover to maintain contrast.
2025-07-31 17:23:11 +09:00
7b49817182 Add WebSocket support for Chromium DevTools endpoints
Implemented WebSocket communication in ChromiumDevTools to support 'page/' endpoints, allowing bidirectional messaging with Chromium DevTools Protocol. Added timeout configuration, improved error handling, and refactored WebSocketManager for connection pooling and reconnection. Updated resources and configuration files to support new timeout settings. Also fixed editor.html to handle direct JSON responses for citi-query.
2025-07-31 16:59:03 +09:00
e579a341a4 Add WebSocketManager.cs and more
Add WebSocketManager.cs and more
2025-07-27 22:25:48 +09:00