Divyansh Singh
unread,Feb 20, 2026, 2:27:22 AMFeb 20Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to dart-gsoc
Hello,
I was working on the sample project ProfileableWebSocket and I have to decide which approach to this would be the best. I would also like to disclose that some approaches were suggested by an LLM.
1. I looked at the HttpProfile code which used a decorator pattern, similarly here the class would be an implementation of WebSocket where I would only care about the methods needed like add() and listen() and record a "SocketEvent". This approach is pretty verbose.
2. [LLM suggested] Using StreamView, which will automatically handle all the other methods without us having to override them ourselves.
3. [LLM suggested] Using a StreamController, recording the events and pushing data into our own controller for the user to listen.
Would love to know what are the tradeoffs here and help me decide on the approach to take, Thanks!