[Ping Interval] WebSocketChannel.connect with pingInterval
Nobody has claimed this yet.
- Dominant language
- Dart
- Stars
- 1.1k
- Forks
- 419
- Avg merge
- 4d 14h
- Merged PRs (30d)
- 8
Description
Hi, I have a question about how I can set pingInterval using WebSocketChannel.
I can set it by
`IOWebSocketChannel.connect(Uri.parse(url), pingInterval: Duration(seconds: 3)`
It works well for iOS and Android. But for web, I got Error: Unsupported operation: Platform._version.
Then I found instead of IOWebSocketChannel, WebSocketChannel (without IO) works on cross platforms.
When I try
`WebSocketChannel.connect(Uri.parse(url), pingInterval: Duration(seconds: 3));`
I found I cannot configure pingInterval.
Thanks in advance!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the IOWebSocketChannel.connect and WebSocketChannel.connect entry points described in the issue, focusing on how pingInterval is handled on web versus iOS and Android. Confirm the expected cross-platform behavior and verify that configuring pingInterval no longer produces the reported web error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100