Update Application_K_Govind_API_Support.md

This commit is contained in:
K GOVIND
2025-04-01 17:19:22 +05:30
committed by GitHub
parent 5624fcab78
commit 800f3fd1fa

View File

@@ -69,47 +69,51 @@ The solution involves providing the users with an option to change ping interval
I have tested my approach on custom endpoints https://github.com/Clasherzz/testing/blob/main/websock.js , echo websocket and multiple fast incoming web socket message endpoints related to bit coin and stock prices to ensure robustness. I have tested my approach on custom endpoints https://github.com/Clasherzz/testing/blob/main/websock.js , echo websocket and multiple fast incoming web socket message endpoints related to bit coin and stock prices to ensure robustness.
``` ```
+--------------------------------+
+-------------------------+ | WebSocket Server |
| WebSocket Server | | - Manages connections |
| - Manages connections | | - Handles messages |
| - Handles messages | +---------------+--------------+
+-----------+-------------+ |
| v
v +--------------------------------------+
+------------------------------------+ | Settings Connection Manager |
| WebSocket Client (web_socket_channel) | | - Ping interval handling |
| - Establishes connection | | - Reconnection attempts |
| - Sends & receives messages | | - Interval between retries |
| - Handles ping & retries | +----------------+-------------------+
| - onError → Update Riverpod state | |
| - onDone → Update Riverpod state | v
+------------------------------------+ +---------------------------------------------------------------+
| | WebSocket Client (web_socket_channel) |
v | - Establishes connection |
+-------------------------------+ | - Sends & receives messages |
| WebSocket Connection Manager | | - Handles ping & retries |
| - Ping interval handling | | - onError → Updates Riverpod WebSocket Response Model State |
| - Reconnection attempts | | - onListen → Updates WebSocket Messages Provider |
| - Interval between retries | | - onDone → Updates Riverpod WebSocket Response Model State |
+-------------------------------+ +----------------------+----------------------+----------------+
| | |
v | |
+-----------------------------+ +------------------------------------+ +--------------------------------+
| Riverpod State Management | | WebSocket Messages Riverpod | | Riverpod State Management |
| - Stores all messages | | Provider | | - Stores all messages |
| - Updates WebSocket Model | | - Stores incoming messages | | - Updates WebSocket Model |
| - Handles UI reactivity | | - Groups messages by request ID | | - Handles UI reactivity |
+-----------------------------+ | - Provides real-time updates | +--------------------------------+
| +------------------------------------+
v |
+--------------------------------+ v
| Flutter WebSocket UI | +-----------------------------------------+
| - Search messages | | Flutter WebSocket UI |
| - Clear all/one message | | - Search messages |
| - Scroll to top/up option | | - Clear all/one message |
| - Dynamic UI per request | | - Scroll to top/up option |
+--------------------------------+ | - Dynamic UI per request |
+-----------------------------------------+
``` ```